Skip to content

Instantly share code, notes, and snippets.

@ches
Created January 9, 2011 03:34
Show Gist options
  • Save ches/771394 to your computer and use it in GitHub Desktop.
Save ches/771394 to your computer and use it in GitHub Desktop.

SciPy, PyQt and Matplotlib on OS X Snow Leopard

The squeeky-clean way with homebrew and pip/virtualenv.

$ easy_install pip
$ pip install virtualenvwrapper mercurial
$ brew install gfortran && brew install pyqt
# Have a nice long coffee break -- compiling Qt took 67 minutes on my
# quad-core i7 MBP, PyQt another 8.
$ brew test pyqt

$ export WORKON_HOME=$HOME/.virtualenvs
$ source /usr/local/bin/virtualenvwrapper.sh
$ export PIP_VIRTUALENV_BASE=$WORKON_HOME
$ export PIP_RESPECT_VIRTUALENV=true
$ mkvirtualenv --no-site-packages scipy

# Ugh. http://xrl.us/bid7jm
# You can skip this if you're using Homebrew-installed Python -- it depends on and compiles against proper GNU readline
$ easy_install readline
$ pip install ipython numpy scipy nose==0.11
# Have another coffee...

# another pip issue, assure latest version -- http://xrl.us/bid7iv
$ pip install -f http://downloads.sourceforge.net/project/matplotlib/matplotlib/matplotlib-1.0.1/matplotlib-1.0.1.tar.gz matplotlib
$ ipython -pylab

# Test things in the REPL, run a cute matplotlib plotting example
>>> numpy.test()
>>> pylab.test('full')
>>> import scipy
>>> scipy.test()

# If you want to have a play with the nifty Spyder IDE focused on Python
# scientific computing (http://packages.python.org/spyder/):
$ pip install rope pyflakes pylint sphinx
$ hg clone https://spyderlib.googlecode.com/hg/ spyderlib
$ python setup.py install
@ches
Copy link
Author

ches commented Jul 15, 2011

Hope you got it working :-)

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