How do I install wxPython on Mac OS X?

David Matuszek picture David Matuszek · Feb 9, 2012 · Viewed 37.3k times · Source

I'd like to use wxPython on my Mac OS 10.7 (Lion) computer. (I'm a Tkinter refugee.) I upgraded from Python 2.7.1, then downloaded and installed wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7.dmg. Here's what I get:

 Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34) 
 [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
 Type "copyright", "credits" or "license()" for more information.
 >>> import wx
 Traceback (most recent call last):
   File "<pyshell#0>", line 1, in <module>
     import wx
   File "/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/__init__.py", line 45, in <module>
     from wx._core import *
   File "/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core.py", line 4, in <module>
     import _core_
 ImportError: dlopen(/usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so, 2): no suitable image found.  Did find:
    /usr/local/lib/wxPython-unicode-2.8.12.1/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so: no matching architecture in universal wrapper

What is this telling me, and what do I do about it???

Answer

Samuel John picture Samuel John · Sep 20, 2012

Homebrew provides wxWidgets 2.9 in full 64bit glory including wxWidgets.

brew install wxmac