So I upgraded to Lion. Predictably, some things went wrong. This time, the main thing that bit me was that for some reason,
pip stopped working. After a bit of messing around with
easy_install, I found out it was almost entirely my own fault. I messed up my
In the meantime, I had uninstalled all of
brew's Python, so I had to reinstall. For me, that entails Python, Numpy, Scipy and Matplotlib. Only this time, Scipy would not build. Some obscure error in some
veclib_cabi_c.c would report errors. A quick round of googling reveals:
In order to get Scipy to compile, you need to insert
#include <complex.h> in
That done, Scipy compiles perfectly fine.
But, that is not enough yet. As this blogpost outlines, Matplotlib is not currently compatible with
libpng 1.5, which ships with Lion. Fortunately, this is already fixed in the most recent source on the Matplotlib repo, so you just have to checkout that:
pip install -e git+https://github.com/matplotlib/matplotlib.git#egg=matplotlib
By doing that, Matplotlib should install just fine.
Seriously though, these PyPi repos are in a very sorry state. Every time I install one of these packages, I have to jump through hoops and spend hours debugging packages that really should work right out of the box. After all,
gem can do it just fine. Why is
pip such a horrible mess?