Skip to content

Instantly share code, notes, and snippets.

@edwardw
Created November 24, 2012 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edwardw/4138639 to your computer and use it in GitHub Desktop.
Save edwardw/4138639 to your computer and use it in GitHub Desktop.
Install numpy/scipy on mountain lion

Scipy Superpack is kind nice, but it seems to be inactive for a while and I want every thing under my complete control. So I went on installing them myself under homebrew-ed python.

Prerequisite

$ brew install python
$ brew install gfortran swig

Scipy/Numpy

First try failed with something mysterious. pip install numpy went well but pip install scipy complained:

Could not find file(s) ['/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/lib/npy-pkg-config/npymath.ini']

Turns out there's a simply solution. With some extra options, pip actually keeps those intermediate files and scipy installer will happily find them:

$ pip install --log pip_numpy.log --build pip_numpy numpy
$ pip install scipy
$ pip install ipython
$ pip install pandas
$ pip install pymc
$ pip install scikit_learn
$ pip install statsmodels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment