我已经编写了一个python脚本并在我的mac上运行良好,但是当我使用py2app并运行app与其他mac.it的错误时。
Traceback (most recent call last):
File "/Users/dfrobot/Downloads/1.app/Contents/Resources/__boot__.py", line 137, in <module>
_run()
File "/Users/dfrobot/Downloads/1.app/Contents/Resources/__boot__.py", line 121, in _run
exec(compile(source, path, 'exec'), globals(), globals())
File "/Users/dfrobot/Downloads/1.app/Contents/Resources/1.py", line 4, in <module>
from PyQt4.QtCore import *
File "PyQt4/QtCore.pyc", line 14, in <module>
File "PyQt4/QtCore.pyc", line 10, in __load
File "imp.pyc", line 343, in load_dynamic
ImportError: dlopen(/Users/dfrobot/Downloads/1.app/Contents/Resources/lib/python3.5/lib-dynload/PyQt4/QtCore.so
, 2): Library not loaded: @rpath/QtCore.framework/Versions/5/QtCore
Referenced from: /Users/dfrobot/Downloads/1.app/Contents/Resources/lib/python3.5/lib-dynload/PyQt4/QtCore.so
出乎意料的是,当我在其他mac上安装QT时,它运行良好。为什么呢?