Skip to content Skip to sidebar Skip to footer

Can't Import Wx(python) On Mac Os X

It is first time I'm using python on mac. I installed Python 2.7.1 from python.org and then wxPython2.8-osx-unicode-py2.7 (Mac OS X 10.6.6) I have no idea where they installed to,

Solution 1:

As FogleBird says, wxPython use 32-bit and Mac Python installer should offer both architectures. So invoking python with 32 bit should allow you to use it with no issue. to invoke Python in 32-bit

$ python2.7-32
Python 2.7.2 (v2.7.2:8527427914a2, Jun 112011, 15:22:34) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type"help", "copyright", "credits"or"license"for more information.
>>> import wx
>>> print wx.version()
2.8.12.1 (mac-unicode)

instead of just $ python

Solution 2:

You need to use 32-bit Python to use wxPython.

These binaries should work on all versions of OSX from 10.3.9 onwards on either PPC or i386 architectures. Since they use the Carbon API they are limited to running in 32-bit mode.

Post a Comment for "Can't Import Wx(python) On Mac Os X"