我不是PyQt4的新手,以前运行过它,但现在(在更新到MacOSX.6之后)并重新安装PyQt4 (4.9with sip-4.13.1),每个从PyQt4导入任何特定内容的程序都会退出,并显示错误消息:
Traceback (most recent call last):
File "helloQt.py", line 6, in <module>
from PyQt4.QtGui import QApplication, QLabel
ImportError: No module named QtGui奇怪的是,Python.Framework包含用于QtCore.a的静态库,但只是一个简单的__init__.py,没有指定要加载的内容。
感谢您的建议melli79
发布于 2019-05-17 04:33:45
您可以尝试:
from PyQt4 import QtGui这应该行得通。
https://stackoverflow.com/questions/9047108
复制相似问题