With wxPython (latest) installed on OS X Lion, an attempt to import wx
in the interpreter results in:
File "wx/__init__.pyc", line 45, in <module>
File "wx/_core.pyc", line 4, in <module>
File "wx/_core_.pyc", line 18, in <module>
File "wx/_core_.pyc", line 11, in __load
ImportError: /Users/Pyderman/Downloads/e30356784638/dist/Program.app/Contents/Resources/lib/python2.6/lib-dynload/wx/_core_.so: no appropriate 64-bit architecture
So following the instructions given by man python
, I set:
export VERSIONER_PYTHON_PREFER_32_BIT=yes
and then the import of wx works (in the interpreter). Yet when I bundle the program into an OS X app using py2app, the error re-occurs, even though I am trying to launch the app within the same terminal where I have set the environment variable to prefer 32 bit.
I'm guessing that somehow py2app doesn't "know" that 32-bit is preferred? But how so, and how can this be enforced or controlled?