I’m following the instructions starting from “Putting it all together” to create the MacApp.py script and the setup.py script.
http://wiki.wxpython.org/Optimizing%20for%20Mac%20OS%20X
I then run the following command
python setup.py py2app -A
and try to run my application from the terminal
./dist/MacApp.app/Contents/MacOS/MacApp
but I get the following error
Traceback (most recent call last):
File “/Users/me/py2app/dist/MacApp.app/Contents/Resources/boot.py”, line 342, in
_run()
File “/Users/me/py2app/dist/MacApp.app/Contents/Resources/boot.py”, line 335, in _run
exec(compile(source, script, 'exec'), globals(), globals())
File “/Users/me/py2app/MacApp.py”, line 10, in
import wx
ImportError: No module named wx
2014-01-14 05:46:50.871 MacApp[28921:507] MacApp Error
I am able to run my application from the terminal without issue.
python MacApp.py
Why am I receiving an import error (I also tried included wx in my setup.py file)?