Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save audy/4012573 to your computer and use it in GitHub Desktop.

Select an option

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

audy commented Nov 4, 2012

Copy link
Copy Markdown
Author

Addendum:

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

@cbrownfl

cbrownfl commented Nov 7, 2012

Copy link
Copy Markdown

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

@arel

arel commented Jan 26, 2013

Copy link
Copy Markdown

Thanks! Also, SciPy depends on SWIG:

 brew install swig

@kxd8163

kxd8163 commented Mar 15, 2013

Copy link
Copy Markdown

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
Copy Markdown

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

@czarina

czarina commented Apr 28, 2013

Copy link
Copy Markdown

Thanks, this is fantastic!

@saranyan

Copy link
Copy Markdown

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

@devinshields

Copy link
Copy Markdown

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

@lfreina

lfreina commented Mar 28, 2014

Copy link
Copy Markdown

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