1
我用conda這樣安裝了PyQt5:conda install -c inso pyqt5 = 5.6。我有python 3.5。當我運行一個使用PyQt5的簡單程序時,程序停滯在PyQt5導入中,並且沒有錯誤消息。它卡住了大約5秒鐘,然後程序才終止。看到我在谷歌上找到的下面的例子。該程序卡在行from PyQt5.QtWidgets import QApplication, QWidget
。我可以在C:\ Users \ user \ Anaconda3 \ Lib \ site-packages \ PyQt5中看到包裝箱。什麼可能導致吸吮行爲?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_())