Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/qt/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 使用Wing和PyQt加载Qt库时出错_Python_Qt_Pyqt4_Wing Ide - Fatal编程技术网

Python 使用Wing和PyQt加载Qt库时出错

Python 使用Wing和PyQt加载Qt库时出错,python,qt,pyqt4,wing-ide,Python,Qt,Pyqt4,Wing Ide,一段时间以来,我一直在尝试让PyQt4在我的OSx机器(10.8.5)上工作——我使用安装程序将其加载到我的windows机器上,没有问题 我使用自制软件在我的机器上加载了sip 4.8.5、Python 2.7 Qt 4.8.5 在WING中调试以下文件时,出现以下错误: 来自Zetcode的代码作为测试 例外情况: ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/PyQt4

一段时间以来,我一直在尝试让PyQt4在我的OSx机器(10.8.5)上工作——我使用安装程序将其加载到我的windows机器上,没有问题

我使用自制软件在我的机器上加载了sip 4.8.5、Python 2.7 Qt 4.8.5

在WING中调试以下文件时,出现以下错误:

来自Zetcode的代码作为测试 例外情况:

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

我个人不使用自制软件,但我很肯定它会在
/usr/local
中安装东西。从错误消息看,它似乎正在访问
/Library/Frameworks/Python.framework
。我也没有使用WingIDE,但看起来它使用的python安装与您希望的不同。我确信有一种方法可以指定它使用的python。

您可能需要将项目属性(从项目菜单)中的python可执行文件设置为/usr/local/bin/python,或者在安装了PyQt4的python中设置sys.Executable的值

请注意,在Wing 101中,这是在Configure Python对话框中完成的,该对话框可从编辑菜单访问

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