Numpy, Scipy, Matplotlib rebuild recipie (Leopard)

The steps I used to refresh the trinity of python packages goes something like:
Nuke all old versions. *ALL* old versions! Fortune favours the bold – of course it will work!

svn co numpy
cd numpy
python build
sudo python install

svn co scipy

or just svn update if I’m feeling lazy. Then in the scipy source directory,

python build_src build_clib --fcompiler=gnu95 build_ext --fcompiler=gnu95 build
sudo python install

Not sure if the deployment target variable works for 10.5, but it seems logical.

Then get the matplotlib egg (it was a pita to build the first time so screw that). You may need to rename it (to the name below), otherwise it might try to download and build everything, which is ok if you have the spare time and patience to troubleshoot the build process.

sudo easy_install matplotlib-0.98.0-py2.5.egg

Matplotlib is not much good in the atmospheric sciences without Basemap. /opt/local is for macports, so the Geos library can just live in /opt. Basemap documentation. Setting GEOS_DIR didn’t seem to help Basemap find the library (I seem to remember having this problem with another python package, CDAT probably), so I had to add it manually to


These notes are for me, for quality advice always use the documentation provided by the tool distributors and the mailing lists. To do: build optimised atlas, lapack etc and configure scipy to use these.


Leave a Reply

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

You are commenting using your 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: