computer science, math, programming and other stuff
a blog by Christopher Swenson

Mac OS X Python

Python Logo

Python on Mac OS X is poorly designed and all sorts of unfun to fix. Certain packages work better with the built-in Python, certain work better with fink/ports/portage Python. However, wxPython only works with the built-in one, since it integrates with Aqua, so I decided to switch everything over to using only the built-in version.

Here is what you need to do to get up to speed:

  1. Update to the latest Python for OS X.
  2. If you are running on an Intel processor on OS X 10.5 Leopard, fix (really, unbreak) your Python core Makefile to drop PPC support, since it breaks things like PIL. (The link just stays to remove all -arch ppc's from /Library/‌Frameworks/‌Python.framework/‌Versions/‌Current/‌lib/‌python2.5/‌config/‌Makefile
  3. Install everything either with Framework packages (wxPython), or by manually building via sudo python install.

For my work, the core packages are wxPython, numpy + scipy, matplotlib, and the Python Imaging Library. I've successfully installed them all now using the above method, but note that numpy and scipy will not install via the OS X package, but have to be compiled from source.