Sunday, March 24, 2013

Setting up matplotlib Python Package on a Mac

Thanks to this post, I've managed to get python and a few packages working on a Hackintosh running Snow Leopard. However, I found matplotlib to be particularly challenging, even with the instructions. Hence, for myself and others, I have decided to record my insights.

Once you have homebrew, python, and numpy installed as indicated in the post, above, do as follows in a terminal:

brew install freetype
brew install libpng

chmod +w /usr/local/lib
brew link freetype --force --overwrite

The last line should fail, but list a couple of files. Find the files (it tells you where they are) and delete them (or move them into a new folder for safe keeping). Retype the command and the link should occur. Then:

chmod +w /usr/local/include
brew link libpng --force --overwrite

As in the previous case, this will fail and list a few files. Proceed as in the previous case. Retype the command.

Finally type:

pip install matplotlib
pip install git+git://

You'll have to use the latter if you're using the Mountain Lion OS. It was the latter that I concluded with, personally.

No comments:

Post a Comment

A place in which to share your thoughts...