Quantcast
Channel: solem's vision blog
Viewing all articles
Browse latest Browse all 31

Installing Numpy and Matplotlib on Mac OS X 10.6 Snow Leopard

$
0
0
This is partly an update to my previous post on installing for Leopard, partly a note to myself. After upgrading to Snow Leopard (and 64bit) I could still use my MacPort installs but not upgrade or install new ones (since all previous builds were for 32bit). So, time for another fresh install.

With MacPorts:

sudo port install python26
sudo port install py26-numpy
sudo port install py26-matplotlib

After this I can start python and load pylab but I get problems with the plotting window totally missing. My colleague Jerome Piovano found a fix over at stackoverflow. Replace the last line with

sudo port install py26-matplotlib +cairo+gtk2

Then edit ~/.matplotlib/matplotlibrc (it should be in your home directory, if no such file exists just make a new file) by adding:

backend: MacOSX

Now everything works as it should.

Viewing all articles
Browse latest Browse all 31

Trending Articles