Update: These instructions are over a year old, though they may still work for you. See the “Install Python” page for the most up-to-date instructions.
I’ve already written a post about installing Python, NumPy, SciPy, and matplotlib on Lion, but it involves a lot of working at the command line, modifying your
.bash_profile and dealing with compiler problems. That’s what I’ll call the compile-it-yourself (CIY) method. What I’ll describe below I’ll call the “double click” method.
I personally use the CIY method because it allows me to very easily control what’s installed. With Homebrew and pip I can uninstall and upgrade different things at will, or choose to install bleeding-edge versions. But it’s more hassle than everyone wants and there’s now an easier way using double-click installers.
Until recently the CIY was the only way to get everything working on Lion but now the developers of NumPy, SciPy, and matplotlib have all caught up and it’s possible to just download and double-click on a few DMG files to get a basic scientific Python installation working. Once you get to know Python, though, you will undoubtedly want to install some other packages and when that time comes I suggest you use pip.
Note: I’ve provided the names of the most current packages as of March 1, 2012. By the time you do this the versions may have been updated so the most recent versions may not exactly match the names below. Make sure you get the most recent version that is explicitly for Mac OS 10.6-10.7+.
Go to the Python download page and download the package called Python 2.7.2 Mac OS X 64-bit/32-bit x86-64/i386 Installer. Double-click the downloaded .dmg file to install Python.
Go to the NumPy download page and download the package called numpy-1.6.1-py2.7-python.org-macosx10.6.dmg. Install as usual.
Go to the SciPy download page and download the package called scipy-0.10.1-py2.7-python.org-macosx10.6.dmg. Install as usual.
Go to the matplotlib download page and download the package called matplotlib-1.2.0-py2.7-python.org-macosx10.6.dmg. Install as usual.
Congratulations, that should do it! If you ever want to upgrade one of these in the future revisit the appropriate download page and get the latest .dmg file. Fire up Python at a terminal and make sure things worked. The following should work in Python with no errors:
import numpy import scipy import matplotlib