Skip to content

Instantly share code, notes, and snippets.

@brandonheller
Created April 25, 2012 05:59
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 brandonheller/2486966 to your computer and use it in GitHub Desktop.
Save brandonheller/2486966 to your computer and use it in GitHub Desktop.
OS X install script for Matplotlib, from source
#!/bin/bash
# Install setuptools?
# http://pypi.python.org/pypi/setuptools
if [[ `sw_vers | grep ProductVersion | awk '{print $2}' | grep 10.6` ]]
then
# Using OS X 10.6.x:
echo "Installing on OS X 10.6..."
curl -OL http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg#md5=bfa92100bd772d5a213eedd356d64086
mv setuptools-0.6c11-py2.6.egg* setuptools-0.6c11-py2.6.egg
sudo sh ./setuptools-0.6c11-py2.6.egg*
elif [[ `sw_vers | grep ProductVersion | awk '{print $2}' | grep 10.7` ]]
then
# Using OS X 10.7.x:
echo "Installing on OS X 10.7..."
curl -OL http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg#md5=fe1f997bc722265116870bc7919059ea
mv setuptools-0.6c11-py2.7.egg* setuptools-0.6c11-py2.7.egg
sudo sh ./setuptools-0.6c11-py2.6.egg*
else
echo Could not detect which version of OS X is in use... exiting.
exit
fi
sudo easy_install numpy
# Install brew from https://github.com/mxcl/homebrew/wiki/installation
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"
# Install Matplotlib
# http://the.taoofmac.com/space/blog/2011/07/24/2222
brew install pkgconfig
cd Desktop/
git clone git://github.com/matplotlib/matplotlib.git
cd matplotlib/
git checkout v1.1.0
python setup.py build
sudo python setup.py install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment