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?
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 ou'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.
Please ignore; I was mistaken
You may already have Python 2.3 installed.
Have a look under /System/Library/Frameworks/Python.framework/Versions/
I've got 2.3 and 2.5 in here, although my setup points to 2.5. You could just change whatever path Python points to to the 2.3 version for your testing and then change it back when done.
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.
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/).
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.