Skip to content

Instantly share code, notes, and snippets.

@joshuaclayton
Created November 30, 2010 05:36
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save joshuaclayton/721214 to your computer and use it in GitHub Desktop.
Save joshuaclayton/721214 to your computer and use it in GitHub Desktop.
Homebrew-installed Python with pyobjc-core and pyobjc
I use Homebrew and wanted to install pip for mercurial. Pip requires a homebrew-installed version of Python, which is fine and dandy; however, I noticed that webkit2png was broken after I installed Python with Homebrew (it was missing pyobjc libs, which comes with the OS X Python install by default).
This assumes that the current homebrewed version of Python is 2.7.1 and that homebrew is set up for /usr/local. If that's not the case, you may have to change the minor version of setuptools (e.g. from 2.7 to 2.8) and change the PATH accordingly.
$ brew install python
Modify your PATH to include the path to Python's bin directory:
export PATH="/usr/local/Cellar/python/2.7.1/bin:/usr/local/bin:$PATH"
Open up a new terminal so PATH reflects the changes.
$ cd /tmp && curl http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg -o setuptools-0.6c11-py2.7.egg && sh setuptools-0.6c11-py2.7.egg
$ export MACOSX_DEPLOYMENT_TARGET=10.6
$ easy_install pyobjc-core pyobjc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment