Skip to content

Instantly share code, notes, and snippets.

@joshcutler
Forked from ahankinson/gist:985173
Created September 1, 2011 02:22
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 joshcutler/1185291 to your computer and use it in GitHub Desktop.
Save joshcutler/1185291 to your computer and use it in GitHub Desktop.
Install WxPython 2.9 64-bit with Homebrew Python Framework install
# These instructions work for OS X 10.6 with homebrew pre-installed.
brew install python --framework
brew install gfortran
# install other dependencies through pip:
pip install numpy
# the regular pip build for matplotlib is b0rken, and it can't find the built-in libraries for OSX
export LDFLAGS="-L/usr/X11/lib"
export CFLAGS="-I/usr/X11/include -I/usr/X11/include/freetype2 -I/usr/X11/include/libpng12"
pip install -e git+git@github.com:matplotlib/matplotlib.git#egg=matplotlib
pip install lxml
# Download the WxPython installer from the nice people at WxPython. Remember that we're going for
# the 64bit Python 2.7 Cocoa build.
# http://www.wxpython.org/download.php#unstable
# After installing wxPython we need to get it to work. Add the $PYTHONPATH environment variable
# to your shell. (mine is .zshrc, yours might be .bashrc)
export PYTHONPATH="/usr/local/lib/wxPython/lib/python2.7/site-packages/wx-2.9.1-osx_cocoa:/usr/local/lib/wxPython/lib/python2.7/site-packages:$PYTHONPATH"
# We need to do some symlinking to get everything working.
cd /usr/local/lib/python2.7
ln -s ../wxPython/lib/python2.7/wxhack.pth .
ln -s ../wxPython/lib/python2.7/wxhack.py .
# finally, we're ready to install gamera.
brew install https://github.com/ahankinson/homebrew/raw/master/Library/Formula/gamera.rb
# symlink gamera_gui into your path.
cd /usr/local/bin
ln -s ../share/python/gamera_gui .
# fix up any permissions problems so that homebrew stays happy and well fed.
cd /usr/local
sudo chown -R user:group *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment