安裝舊版本的 Python 以在 Mac OS X 上進行測試 (Install older versions of Python for testing on Mac OS X)


問題描述

安裝舊版本的 Python 以在 Mac OS X 上進行測試 (Install older versions of Python for testing on Mac OS X)

I have Mac OS X 10.5.7 with Python 2.5. I need to test a package I am working on with Python 2.3 for compatibility. I don't want to downgrade my whole system so is there a way to do an install of Python 2.3 that does not change the system python?

‑‑‑‑‑

參考解法

方法 1:

You have two main options, install the python 2.3 from macports (easy) or install from source.

For macports, run port install python23

For the 2nd, you'll have to go to http://www.python.org/download/releases/2.3.7/ to download the source tarball. Once you have that open a terminal and run ./configure ‑‑prefix /home/(your homedir)/software MACOSX_DEPLOYMENT_TARGET=10.5 then make and make install. This should place a separate install in the software directory that you can access directly.

方法 2:

This page has useful information on building python from source.  It's talking about 3.0, but the advice will probably apply to 2.3 as well.

方法 3:

You can also use the Fink package manager and simply to "fink install python2.3".

If you need Python 2.3 to be your default, you can simply change /sw/bin/python and /sw/bin/pydoc to point to the version you want (they sit in /sw/bin/).

方法 4:

One alternative is to use a virtual machine. 

With something like VMWare Fusion or Virtualbox you could install a complete Linux system with Python2.3, and do your testing there. The advantage is that it would be completely sand‑boxed, so wouldn't affect your main system at all.

(by AaronDana the SaneJohn FouhyEric O LebigotDaniel Roseman)

參考文件

  1. Install older versions of Python for testing on Mac OS X (CC BY‑SA 3.0/4.0)

#installation #Python #Version






相關問題

Instal versi Firebird yang benar (32bit atau 64bit) dengan Inno Setup (Install correct version of Firebird (32bit or 64bit) with Inno Setup)

在 Ubuntu 中與 EPD python 一起安裝 NLTK (Installing NLTK alongside EPD python in Ubuntu)

INSTAL_PARSE_FAILED_NO_CERTIFICATES - 試圖在 robotsium 上測試不是我的 .apk 文件 (INSTAL_PARSE_FAILED_NO_CERTIFICATES - trying to test not my .apk file on robotium)

直截了當的回答:安裝 py2app (Straight and simple answer: installing py2app)

Sql 2008 排序規則 (Sql 2008 Collation)

Apache Ant Build 命令“拒絕訪問” (Apache Ant Build command "Access Denied")

如何在 C# 部署中包含文件? (How can I include files in a C# deployment?)

使用一個安裝程序安裝多個軟件(安裝包裝器?) (Install multiple softwares with one installer (install wrapper?))

如何獲取 Eclipse 安裝目錄的絕對路徑? (How can I get the absolute path to the Eclipse install directory?)

iPhone,如何使用objective-c為iphone安裝新字體? (Iphone,how to install new font to iphone by using objective-c?)

create-react-app 命令卡在使用 cra-template 安裝 react react-dom react-scripts (create-react-app command stuck on installing react react-dom react-scripts with cra-template)

tensorflow安裝報錯(ERROR:找不到滿足tensorflow要求的版本) (Tensorflow installation error (ERROR: Could not find a version that satisfies the requirement tensorflow))







留言討論