我用conda安装了PyQt5:conda install-c inso PyQt5=5.6。我有python3.5。当我运行一个使用PyQt5的简单程序时,该程序在PyQt5导入时卡住,并且没有错误消息。它被卡住了大约5秒钟,然后程序就终止了。请看下面我在google上找到的例子。程序卡在from PyQt5.QtWidgets import QApplication, QWidget
行上。我可以在C:\Users\user\Anaconda3\Lib\site packages\PyQt5中看到packcage。是什么导致了这种行为
"""
ZetCode PyQt5 tutorial
In this example, we create a simple
window in PyQt5.
author: Jan Bodnar
website: zetcode.com
last edited: January 2015
"""
import sys
from PyQt5.QtWidgets import QApplication, QWidget
app = QApplication(sys.argv)
w = QWidget()
w.resize(250, 150)
w.move(300, 300)
w.setWindowTitle('Simple')
w.show()
sys.exit(app.exec_())
第一句话解决了我的问题DLL load failed when importing PyQt5
我卸载了pyqt5并重新安装了wtih
conda install channel https://conda.anaconda.org/bpentz pyqt5
相关问题 更多 >
编程相关推荐