

To install Homebrew paste the following in a terminal: ruby -e "$(curl -fsSL )" It builds packages from source, intelligently re-uses libraries that are already part of OS X, and encourages best practices like installing Python packages with pip. Homebrew is my favorite package manager for OS X. If you’ve installed Xcode on Snow Leopard then you already have the command line tools. If you’ve already installed Xcode on Lion or Mountain Lion then you can install the command line tools from the preferences. Head over to /downloads, register for a free account, and download (then install) the latest “Command Line Tools for Xcode” for your version of OS X. These include important things like development headers, gcc, and git. The first order of business is to install the Apple command line tools. If you need other libraries they can most likely be installed via pip and any dependencies can probably be installed via Homebrew. I’ll show how I install Python and the basic scientific Python stack: I do this because Homebrew makes it easier to compile these with non-standard options that work around an issue with SciPy on OS X. These instructions differ from my previous set primarily in that I now use Homebrew to install NumPy, SciPy, and matplotlib. I’m running the latest OS X Mountain Lion (10.8) but I think these instructions should work back to Snow Leopard (10.6). You can always check the Install Python page for other installation options. These instructions detail how I install the scientific Python stack on my Mac. Setting the State of a Postgres Sequence.
