Trials of the early adopter

July 25, 2011 in Data,Technology

Update: this post is now completely obsolete. I've posted a much more comprehensive guide to installing Python, NumPy, SciPy, matplotlib and IPython on Lion here.

This post is meant as a public service announcement for an extremely small audience. If you don't think this is directed at you, then it almost certainly isn't. I'm happy to say you'll find much more interesting things to read here (I love this site -- it goes great with Instapaper).


I struggled all day to install Scipy on my new Lion machine. I'm running a Homebrew Python and tried using pip to install Scipy, but it turns out that the version of gfortran that Homebrew currently installs causes errors when compiling Scipy (having to do with a nonstandard complex float variable declaration).

Hopefully, in the next few days the kinks will be worked out. In the meantime, by partially following some of the advice on these two pages (one, two), I was able to build Scipy successfully. The crux is installing the latest gfortran build (4.2.4, build 5666), but even after following these instructions I could only get 4.2.1 (build 5664) to run via Homebrew, despite every appearance of 4.2.4 being installed. Ultimately, I gave up on the Homebrew approach and downloaded the 5666 build directly from the AT&T Research R repository. Additionally, I added an explicit complex float declaration to the top of three Scipy files as described in this comment, but because I did that prior to getting 5666 to run, I can't say with certainty whether it was necessary or not. After all that, Scipy compiled successfully.

I hope that this saves someone the hours it took for me to work it out -- but more than that I hope this information is obsolete within days.

Update: Here is a workaround for building Matplotlib in Lion

{ 1 comment… read it below or add one }

Leave a Comment

Previous post:

Next post: