一段时间以来,我一直试图让 PyQt4 在我的 OSx 机器(10.8.5)上工作 - 我已经通过使用安装程序将它加载到我的 Windows 机器上,没有问题。
我使用自制软件在我的机器上加载了 sip 4.8.5、Python 2.7 Qt 4.8.5。
当我尝试在 WING 中调试以下文件时,出现以下错误:
来自 Zetcode 的代码作为测试
import sys
import QtGui
def main():
app = QtGui.QApplication(sys.argv)
w = QtGui.QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
例外:
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/PyQt4/_qt.so, 2):
Library not loaded: QtDesigner.framework/Versions/4/QtDesigner
Referenced from: /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/PyQt4/_qt.so
Reason: image not found
为什么没有加载 Qt 库?我需要做什么才能加载库?谢谢,-j