Installing scientific Python on OS X

Just had a very nice experience getting a full scientific Python up an running on OS X in five minutes thanks to the Enthought Python Distribution. The hardest part was deciding not to build things myself: Although Enthough Python is free for academic use, it is not free in Stallman terms. Still, the knowledge that it is made from free components and that you could in principle build everything yourself makes for a nice untrapped feeling. Python is quickly becoming the language of choice for numerical physics, either on its own as a front-end to high performance C/Fortran code. In spite of the ‘batteries included’ Python policy, you need a few addons to really get scientific Python code going:

Although OS X comes with Python installed, you will likely want to install a separate version for coding: both to keep up with the Python community, but also to avoid polluting the official OS X python with you additions. The two obvious ways to add an extra Python are

  • Install via MacPorts, one of the opensource software managers for OS X
  • Install MacPython which is the OS X version of the standard Python distribution

After browsing quite a bit, it seems that getting the “big 3” up an running with either Python is a mess, at which point I ended up decided to go for Enthougth. An unrelated figure (made in Mathematica)