Installing matplotlib in Lion

Given that now has loads of spiffy updates and that one of the things I’m involved in is data visualization, I’ve already had to figure out how to install matplotlib to render some datasets.

At first, I tried doing:

export PKG_CONFIG_PATH="/usr/x11/lib/pkgconfig"
sudo easy_install matplotlib

…first to use the built-in pkgconfig, and take advantage of easy_install, but the only way to get things going was by using homebrew and :

sudo brew install pkgconfig
cd Desktop/
git clone git://
cd matplotlib/
python build
sudo python install

And that’s it, you’re good to go.