Xah Lee, 2005-03-07
The following details installing Python 2.4 on OS X 10.4.x. It probably also works for later versions of Python or OS X.
If you are on a Mac and wish to install python 2.4, it's pretty easy.
If you have fink installed, just do “fink desc python” to see if 2.4 is there, if so, then “fink install python”.
I highly recommend fink if you don't have it already. http://fink.sourceforge.net/.
If you don't have fink and don't want to use fink, then:
that should install a copy of Python at “/usr/local/bin/python”. If you wish it be installed somewhere else, use:
“./configure --prefix=/Users/mary/python” in the configure step, for example.
once installed, you want to make sure that everytime you call “python” in the command line, 2.4 is called instead of the old. easiest way is to make a link, like this:
sudo ln -s /usr/local/bin/python /usr/local/bin/py
this will create a file (a symbolic link) at “/usr/local/bin/py” that points to /usr/local/bin/python. So, just type “py your_python_script.py” to run it and you know you'll be running 2.4. Calling “python” will remain 2.3.
Do not try to upgrade the Python that is bundled with OS X, because OS X the system depends on it.
Page created: 2005-03. © 2005 by Xah Lee.