osx - Can't import wx(Python) on Mac OS X -
it first time i'm using python on mac. installed python 2.7.1 python.org , wxpython2.8-osx-unicode-py2.7
(mac os x 10.6.6)
i have no idea installed to, anyway, that's get:
python 2.7.1 (r271:86882m, nov 30 2010, 10:35:34) [gcc 4.2.1 (apple inc. build 5664)] on darwin type "help", "copyright", "credits" or "license" more information. >>> import wx traceback (most recent call last): file "<stdin>", line 1, in <module> file "/usr/local/lib/wxpython-unicode-2.8.11.0/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/__init__.py", line 45, in <module> wx._core import * file "/usr/local/lib/wxpython-unicode-2.8.11.0/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.11.0/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.11.0/lib/python2.7/site-packages/wx-2.8-mac-unicode/wx/_core_.so: no matching architecture in universal wrapper >>>
as foglebird says, wxpython use 32-bit , mac python installer should offer both architectures. invoking python 32 bit should allow use no issue. invoke python in 32-bit
$ python2.7-32 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 "help", "copyright", "credits" or "license" more information. >>> import wx >>> print wx.version() 2.8.12.1 (mac-unicode)
instead of $ python
Comments
Post a Comment