Not sure if this still works, but give it a shot:
Hold down the Option key when clicking on the Purchased tab key in the Mac App Store app. That shortcut makes Lion reappear in the list (if you bought it there). Make a copy of the installer and put it on a USB key or DVD. You can also Google around to find out how to make a bootable copy as well.
While there are obviously differences in the different versions of Python, there are also differences between the "system" Python and those you install via Python.org, MacPorts, Homebrew, etc. All of these "additional" versions can coexist quite happily with the system versions in /System/Library/Frameworks/Python.framework/Versions
- I have 2.3, 2.5.6, 2.6.7, and 2.7.2 on my 10.8.4 iMac which originally came with Lion installed. /usr/bin/python
is 2.7.2.
Basically, there is no good reason to get rid of any of the system Pythons (they only take up ~200MB), and some very good reasons to not get rid of them. They are included for a reason, and there are various system utilities and programs that depend on them. You could get strange, unexplained behavior if you remove them, and vital stuff may not work, as Python scripts and libraries are behind some major system tools. Python has been designed to have multiple versions living happily side-by-side, so if your system is set up properly (which I generally trust the Apple engineers to have done), there won't be any conflicts as hypothesized by another answer.
If you want to change which version of Python runs by default when you type python
into the Terminal prompt, then change your $PATH
environment variable to point toward your installation of choice, do not unlink or change /usr/bin/python
. For example, I use MacPorts, so /opt/local/bin
is ahead of /usr/bin
in my $PATH
, so I never run the "system" version 2.7.2. You can then start your scripts with
#!/usr/bin/env python
and it will search your path for the correct binary.
You should have no problems at all using MacPorts point to your version of choice. One thing I would suggest, though, is to keep /opt/local/bin/python
pointing to the latest version of Python 2 (2.7.5, currently), and use /opt/local/bin/python3
point to 3.3.2. Yes, you have to remember to add the 3
on the end of the command, but several months back I tried setting python
to Py3, and occasionally would get weird errors from some programs expecting Py2 to be there.
Hopefully this helps answer your actual question, please let me know if you need anything else.
Best Answer
do it with the scipy superpack, by Chris Fonneback. It's very easy, automated and it works (using it right now!).
It also takes care of installing Fortran for you, which is mandatory for the python libraries to work.
PS: If you have Lion, Numpy is already part of it.