Skip to content

Instantly share code, notes, and snippets.

@ahankinson
Created May 22, 2011 04:02
Show Gist options
  • Save ahankinson/985173 to your computer and use it in GitHub Desktop.
Save ahankinson/985173 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 [email protected]: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 *
@ryohang
Copy link

ryohang commented Jun 15, 2012

installing wxPython we need to get it to work. Add the $PYTHONPATH environment variable
saved my 2 hours at least! thx

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