Installing Python, MatPlotLib & iPython on Mac OSX 10.7.3
@dpbrown Thanks Daniel for the post on getting iPython on my MBP:endlesslycurious.com/2011/04/06/ins…
Mac OS X 10.7.3 with 32bit Python 2.7.2, MatPlotLib 1.1.0 and iPython 0.12. Note: currently only the 32 bit version of Python will work consistently with MatPlotLib and iPython.
- Install Python 2.7.2:
- Download the prebuilt ‘python-2.7.2-macosx10.3.dmg’
- Double click the DMG image and double click the pgk.
- Open a terminal and running the command ‘python -V’ to verify that you have ‘Python 2.7.2′.
- Install MatPlotLib 1.1.0:
- Download the prebuilt ‘matplotlib-1.1.0-py2.7-python.org-macosx10.3.dmg′
- 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.12:
- Download the iPython source ‘http://archive.ipython.org/release/0.12/ipython-0.12.zip’
- Extract the zip file.
- cd into extracted directory ‘ipython-0.12′.
- 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 like the one above.