Python – Install older versions of Python for testing on Mac OS X

installationpythonversion

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?

Best Solution

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.