Matplotlib on Mac OS 10.5 Leopard

I spent quite a long time trying to get Matplotlib to work, the problem was the dependencies. It somehow couldn’t find Freetype’s headerfiles. To make a long day short, I installed Macports and just to see that it could configures, builds and install packages automatically is such a timesaver and brainsaver. I thought about using Enthought Python Distro (EPD), but it would be an overkill for me, I just need to plot charts from Python scripts.

Using Macports does take away the ‘fun’ and the challenge on hacking Unix systems, but I’ve got studies to do, so I’ll save that for some time in the holidays.

Even after using Macports, it couldn’t find Matplotlib, turns out it was using the old python (2.5) instead of the new one (2.5.5). This happened even though I installed python_select as instructed. Turns out Macport installs to /opt/local/bin instead of the /usr/local, for reasons you could find on their website. Thus, I added /opt/local/bin to the environment variables path (I thought Macports did this already) by this command:

export PATH=$PATH:/opt/local/bin/

notice I put it last so that it would be in the first order. check with env.

Enjoy Matplotlib!

Posted on January 10, 2011, in Computer Configurations and tagged . Bookmark the permalink. Leave a comment.

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: