Numpy, Scipy and Matplotlib

The Numpy, Scipy and Matplotlib scientific libraries for Python are always a little tricky to install from source because they have all these dependencies they need to build correctly. Luckily for us, Samuel John has put together some Homebrew formulae to make it easier to install these Python libraries.

First, grab the special formulae (which are not part of Homebrew core):

  1. $ brew tap samueljohn/python
  2. $ brew tap homebrew/science

Then, install the gfortran dependency which we will need to build the libraries along with gcc:

  1. $ brew install gcc

Then, install nose, pyparsing and python-dateutil dependency which we will need to build the libraries:

  1. $ pip install nose pyparsing python-dateutil pep8

Finally, you can install Numpy and Scipy with:

  1. $ brew install numpy scipy matplotlib

(It may take a few minutes to build)