I downloaded a package installer for Python 2.6.1, but when I use the python command in terminal (bash) Apple's shipped 2.3.5 version loads up. How can I get 2.6.1 to load up instead?
I am running Leopard, 10.5.5. The python binary, /usr/bin/python, is merely a symlink to the actual binary in the version specific Python folder. For example:
$ ls -l /usr/bin/python
lrwxr-xr-x 1 root wheel 72 Aug 31 2008 /usr/bin/python -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python
And a look inside that /Versions folder reveals this:
$ ls -l /System/Library/Frameworks/Python.framework/Versions/
total 8
drwxr-xr-x 7 root wheel 238 Aug 31 2008 2.3
drwxr-xr-x 13 root wheel 442 Nov 22 20:40 2.5
lrwxr-xr-x 1 root wheel 3 Aug 31 2008 Current -> 2.5
With the help of the ln command to create symlinks, you will be able to set the python in your path to point to the version of python you want to use.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With