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

A

Aaron Scott

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?
 
K

Kevin Walzer

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,818
Latest member
Brigette36

Latest Threads

Top