【发布时间】:2017-06-17 16:37:31
【问题描述】:
我以这种方式使用 conda 安装 PyQt5:conda install -c inso pyqt5=5.6。我有python 3.5。当我运行一个使用 PyQt5 的简单程序时,程序卡在 PyQt5 导入上并且没有错误消息。它卡住了大约 5 秒钟,然后程序就终止了。请参阅下面我在 google 上找到的示例。程序卡在from PyQt5.QtWidgets import QApplication, QWidget 线上。我可以在 C:\Users\user\Anaconda3\Lib\site-packages\PyQt5 中看到包。什么可能导致糟糕的行为?
"""
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_())
【问题讨论】:
标签: python