OSX application built with py2app can't see bundled PySide module?

Kevin Walzer kw at codebykevin.com
Fri Sep 2 09:21:43 EDT 2011

On 9/1/11 3:54 PM, Aaron Scott wrote:
> I'm trying to deploy a Python app on OSX that was built with PySide. py2app packages it without issue, copying and linking a lot of PySide and Qt files in the process. But then, when I try to run the built app, I get this error:
> Traceback (most recent call last):
>    File "/Users/sequence/Desktop/code/dailies/dist/dailies_v02.app/Contents/Resources/__boot__.py", line 31, in<module>
>      _run('dailies_v02.py')
>    File "/Users/sequence/Desktop/code/dailies/dist/dailies_v02.app/Contents/Resources/__boot__.py", line 28, in _run
>      execfile(path, globals(), globals())
>    File "/Users/sequence/Desktop/code/dailies/dist/dailies_v02.app/Contents/Resources/dailies_v02.py", line 9, in<module>
> from PySide.QtCore import *
>    File "PySide/__init__.pyc", line 2, in<module>
>    File "PySide/private.pyc", line 2, in<module>
>    File "PySide/QtCore.pyc", line 18, in<module>
>    File "PySide/QtCore.pyc", line 15, in __load
> ImportError: '/usr/lib/python2.6/lib-dynload/PySide/QtCore.so' not found
> The weird thing is, QtCore.so IS included in the application bundle: py2app copied it to the build under Contents/Resources/lib/python2.6/lib-dynload/PySide/. Is there a reason the application isn't seeing this?

You might want to post this question to the MacPython list--that's where 
the py2app experts are found.

Kevin Walzer
Code by Kevin

More information about the Python-list mailing list