I’ve been through this a few times, sometimes someone else makes it easy, sometimes not. This is somewhere between the two…
- Get python 2.6 from here and install it. Since I already have a link through to the /System python from /Library/Frameworks/Python.framework it goes in /System/Library/Frameworks/Python.framework/Versions/2.6
- Get numpy for python 2.6 from here and install it. It goes in /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/
- Get scipy for python 2.6 from here and install it. It goes in the same place.
- Get freetype2 and libpng using fink. These are needed to build matplotlib. You could always try building matplotlib first to see if it works.
- Get matplotlib from here. There wasn’t a binary for 10.5 when I looked so I had to build it, thus the above step.
- Build and install matplotlib with the command “python2.6 setup.py build” and then “sudo python2.6 setup.py install”
- Get easy_install from here, instructions are on the same page. You’ll have to chmod the egg to be executable. This program is great for installing other packages, it’s in the location used below.
- Install ipython using easy_install with “sudo /Library/Frameworks/Python.framework/Versions/Current/bin/easy_install-2.6 ipython”, it’s in the same place as the easy_install program.
That got me sorted for these packages, however if you wanted to test your installs or numpy and scipy [using numpy.test() and scipy.test()] you need nose, which you can also get with easy_install. You may also want to modify your path or create links to the executables so you don’t have to write the full path into the Framework bin directory.
Since I use python for astronomy I also installed a bunch of other modules including pyFITS, pywcs, vo, and APLpy. Most were found from links on the APLpy website with commands like “sudo /usr/local/bin/python2.6 setup.py install” and APLpy itself with easy_install.
Installing PIL (python imaging library) was a bit trickier, since you need to get the libjpeg and freetype2 libraries (I got them with Fink) first. When you try and build it it’ll likely give errors because the gcc commands include –arch ppc. That can be avoided by executing “
export ARCHFLAGS=”-arch i386″ before you build. Also, the selftest craps out, but doesn’t mean that the build didn’t work.
Good luck. I’m not an expert but I find it handy when I find lists like this…
A view from the bell tower in Tournai, Belguim
Going to Vancouver Island next week, hoping to do some camping so reading up…
“There is no guaranteed minimum safe distance from a bear – the further, the better”
“The cougar’s secretive habits and astounding predatory abilities – a cougar is capable of killing a 270 kg (600 lb) moose – have resulted in a wealth of misconceptions and irrational fears. If a cougar attacks, fight back! Many people have survived cougar attacks by fighting back with anything, including rocks, sticks, bare fists, and fishing poles.”
Did you know that from Eltham Palace the London Eye and Wembley Stadium’s arch line up perfectly?