Installing Python, MatPlotLib & iPython on Snow Leopard
As I have detailed in a previous post the installation of MatPlotLib on Mac OS was a fairly involved process involving the using of Mac Ports to compile and build a complete Python stack. Thankfully it would seem things have become much simpler on Mac OS X 10.6.7 if you are installing Python 2.7.1, MatPlotLib 1.0.1 and iPython 0.10.1. Note: currently only the 32 bit version of Python will work consistently with MatPlotLib and iPython.
- First Python 2.7.1:
- Download the prebuilt ‘Python 2.7.1 Mac OS X 32-bit i386/PPC Installer’ DMG from python.org.
- Mount the DMG image and run the contained installer.
- Verify it worked by opening a terminal and running the command ‘python -V’ which should return ‘Python 2.7.1′.
- Next MatPlotLib 1.0.1:
- Download the prebuilt ‘matplotlib-1.0.1-python.org-32bit-py2.7-macosx10.3′ DMG from MatPlotLib’s SourceForge page.
- Mout the DMG image and run the contained installer.
- Verify this worked by opening a terminal, running python and then ‘import matplotlib’ followed by ‘print matplotlib.__version__’ which should return ’1.0.1′.
- Finally iPython 0.10.1:
- Download the iPython source ‘ipython-0.10.1.zip’ from the iPython download directory.
- Extract the zip file.
- Open a terminal window and CD into the newly extracted directory ‘ipython-0.10.1′.
- Run the command ‘sudo python setup.py install’ and enter your password when prompted.
- Verify this by running iPython with MatPlotLib via ‘ipython -pylab’ and then ‘x = randn(10000)’ followed by ‘hist(x, 100)’ and a chart window like the following image should pop up.

Thanks for the useful post, just an additional note: before I could run matplotlib I had to install numpy (downloaded numpy-1.5.1-py2.7-python.org-macosx10.5) as it’s neither included in the python.org DMG image nor in matplotlib DMG itself. And for running the ipython binary I had to create a symlink manually to /usr/local/bin. Cheers, M.
The other option would be sagemath or maybe pythonxy if you have windows.
“Note: currently only the 32 bit version of Python will work consistently with MatPlotLib and iPython.” — is that true on Linux or only OS X? I have had some trouble getting MatPlotLib working with 64-bit python on linux, but I figured I was doing something wrong and just needed to spend more time on it.
[...] Installing Python, MatPlotLib & iPython on Snow Leopard (tags: leopard mac_osx ipython matplotlib via:zite) [...]
[...] Installing Python, MatPlotLib & iPython on Snow Leopard (tags: leopard mac_osx ipython matplotlib via:zite) [...]
I was able to install everything after python itself by using python’s super-easy “easy_install” feature. I just had to manually install gfortran first (there’s an easy .dmg download), as numpy depends on it, but after that was able to install iPython, numpy, scipy, and a bunch of other doodads quick and easy. Just remember to run under sudo…
Hi all, I got a successful install in /Applications/Python 2.7/ but my version in cl is still Python 2.6.1 which, on my mac lives in /Library/Python/2.6 … how did you solve the problem of multiple versions? Did you declare a path in .bashrc? If I python from cl I don’t get access to anything installed as it’s all in /Applications. Also likewise ‘sudo python setup.py install’ for ipython doesn’t work for me… it just tries to put it in with Python 2.6.1. I do have easy_install but it is also only linked to Python 2.6 in /Library/Python/ and has absolutely refused to install matplotlib or numpy so I’d like to just force it to use the one you recommend above. Any suggestions or path declarations you guys recommend?










Nice, thanks for info. I prefer to install EPD, which contains a lot of additional packages, and everything I need for plotting, computations, ..