BigSnarf blog

Infosec FTW

Installing Python, MatPlotLib and iPython on Mac OSX 10.7.3

Installing Python, MatPlotLib & iPython on Mac OSX 10.7.3

Thanks to @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.

  1. Install Python 2.7.2:
    1. Download the prebuilt ‘python-2.7.2-macosx10.3.dmg
    2. Double click the DMG image and double click the pgk.
    3. Open a terminal and running the command ‘python -V’ to verify that you have ‘Python 2.7.2′.
  2. Install MatPlotLib 1.1.0:
    1. Download the prebuilt ‘matplotlib-1.1.0-py2.7-python.org-macosx10.3.dmg
    2. Mout the DMG image and  run the contained installer.
    3. Verify this worked by opening a terminal, running python and then ‘import matplotlib’ followed by ‘print matplotlib.__version__’ which should return ’1.0.1′.
  3. Finally iPython 0.12:
    1. Download the iPython source ‘http://archive.ipython.org/release/0.12/ipython-0.12.zip
    2. Extract the zip file.
    3. cd into extracted directory ‘ipython-0.12′.
    4. Run the command ‘sudo python setup.py install’ and enter your password when prompted.
    5. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: