[Pythonmac-SIG] Problems getting started with py2app and wxPython

Christopher Barker Chris.Barker at noaa.gov
Wed Sep 30 20:37:44 CEST 2009


Jeff Garbers wrote:
> Hello! I'm just getting started trying to build a standalone Mac 
> application based on wxPython.  I'm on OS X 10.6.1, using Python 2.6.1 
> as distributed with the OS.

note that py2ap will not bundle up python itself in this case, and your 
app will only work on 10.6 systems.

>> ImportError: '/usr/lib/python2.6/lib-dynload/wx/_core_.so' not found

hmmm -- this means it's looking in your system, rather than the bundle, 
for the wx libs...

> Reviewing the output from py2app, I notice that that module -- among 
> others -- was stripped:
> 
>> ...
>> stripping libwx_macud-2.8.0.dylib
>> stripping _controls_.so
>> stripping wxtest
>> stripping _core_.so
>> stripping _misc_.so
>> stripping _gdi_.so
>> stripping _windows_.so

>  Why is pyapp stripping those modules, 

stripping does not mean removing -- I thin it means removing debug 
symbols, etc, i.e. making it smaller. It should not cause this problem.

Aside from putting dylibs into the bundle, py2app also re-writes the 
headers, so that they are linked against the copies in the bundle, 
rather than the system ones -- it looks like this has gone awry.

Do take a look in the bundle ans see what's there. It's very helpful for 
debugging.


I'm not running 10.6, or python2.6, so I'm not much help here, but do 
make sure that you are running the latest py2app -- there have been 2.6 
fixes recently.

You also might try installing a Python.org build, and using that instead 
of Apple's -- you'll need to do that if you want to support older 
systems anyway.

-Chris




-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov


More information about the Pythonmac-SIG mailing list