wxPython on OSX Mavericks with or without Homebrew

April 21, 2014

Just a short note for anyone else who runs into this nonsense: I could not get the current version of wxPython to install in a useful way using homebrew. brew install wxmac --python --devel to install into my Homebrew-controlled Python install worked, but it missed a portion of the code. There should have been a python directory under /usr/local/Cellar/wxmac/3.0.0/lib that contained the relevant code and a wx.pth file I could symlink into virtualenvs. There was not. I don't know if this is a bug or an issue with my setup (some of the links mentioned Homebrew will only install it for use as a "framework" and I honestly have no idea what that means or time to investigate, but I think it may be relevant).

So I tried using the installer provided at wxpython.org but those were all corrupt according to OSX. I had my suspicions about multiple files being corrupt and they turned out to be correct: the files aren't corrupt, they're not signed the way Apple wants.. Shutting off the privacy controls temporarily fixed that. Then it was a simple matter to symlink WX into a virtualenv, e.g.,

ln -s /Library/Python/2.7/site-packages/wxredirect.pth ~/.virtualenvs/envname/lib/python2.7/site-packages/.

Update: turns out, once again, I am an idiot; contrary to what I'd read, you need to install wxpython, which will include wxmac, not the other way around.

Previously: Django Profiling Bug | After this: Handy Bit of Python Detective Kit | All Posts
Tagged: python osx