Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save audy/4012573 to your computer and use it in GitHub Desktop.
Save audy/4012573 to your computer and use it in GitHub Desktop.
How to fucking install matplotlib, scipy, numpy, scikit learn and ipython notebook on Mountain Lion

How to install matplotlib, scipy, numpy, scikit learn and ipython notebook on Mountain Lion

By Austin G. Davis-Richardson

Get Homebrew and Pythonbrew

(Use their installation instructions)

Install gfortran, libpng

brew install gfortran
brew install libpng

Install Python 2.7

pythonbrew install 2.7
pythonbrew use 2.7

Clone matplotlib, scipy, numpy, sklearn and ipythonotebook from fucking master

(I'm downloading master.zip because some of the repos are quite huge)

curl -L https://github.com/numpy/numpy/archive/master.zip > numpy.zip
curl -L https://github.com/matplotlib/matplotlib/archive/master.zip > matplotlib.zip
curl -L https://github.com/scipy/scipy/archive/master.zip > scipy.zip
curl -L https://github.com/scikit-learn/scikit-learn/archive/master.zip > sklearn.zip

Unzip and install

cd into each directory and python setup.py install

Install tornado and pyzmq

(IPython needs this for the Notebook)

pip install tornado
pip install pyzmq

That should work. Let me know if I forgot something.

@devinshields
Copy link

Nice. This is such a pain, thanks for posting with the appropriate expletives!

@lfreina
Copy link

lfreina commented Mar 28, 2014

I was in need of freetype for matplotlib. Thanks for the post!

brew install freetype 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment