Installing SciPy on OSX isn’t very straightforward. Here’s a quick way to get started. If you’re starting from scratch, you’ll need Xcode installed, as well as some package managers: homebrew, the OSX package manager; and pip, the Python package manager. Skip any steps you may have taken care of on your system already.
First, install homebrew like so:$ ruby -e "$(curl -fsSLk https://gist.github.com/raw/323731/install_homebrew.rb)"
Then install pip:
$ curl -O https://github.com/pypa/pip/raw/master/contrib/get-pip.py
$ python get-pip.py
SciPy depends on a newer version of NumPy than comes with OSX. The installed version is 1.2.1, but the minimum required version is 1.4.0. As of this writing, NumPy is at 1.5.1, so let’s install that:
$ cd /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python
$ sudo mv numpy numpy-1.2.1
$ pip install numpy==1.5.1
Note that you may need to pip install NumPy with sudo, depending on your permissions.
Before you finally install SciPy, you need to install a FORTRAN compiler. Homebrew has a recipe for gforth, so go with that:
$ brew install gforth
Lastly, install SciPy. This is going to take a long while.
$ pip install scipy