Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • 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.

@audy
Copy link
Author

audy commented Nov 4, 2012

Addendum:

If you're into Pandas, pip install works just fine.

@cbrownfl
Copy link

cbrownfl commented Nov 7, 2012

Thanks! I have been putting this off. Did not install the iPython notebook yet.

@arel
Copy link

arel commented Jan 26, 2013

Thanks! Also, SciPy depends on SWIG:

 brew install swig

@kxd8163
Copy link

kxd8163 commented Mar 15, 2013

Another issue that the one can face is unsupported X11 in Mountain Lion - so, guys, don't forget to install XQuartz before installing matplotlib ;}
Cheers!

@EderSantana
Copy link

Also, make the following symlink in order to matplotlib see free type
ln -s /usr/local/include/freetype2/freetype/ /usr/include/freetype

@czarina
Copy link

czarina commented Apr 28, 2013

Thanks, this is fantastic!

@saranyan
Copy link

Scipy will fail without Cython. Do an easy_install cython before installing Scipy.

@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