簡體   English   中英

PyQt5卡在導入,但沒有錯誤消息

[英]PyQt5 stuck on import, but no error message

我用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中看到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_())

這里的第一條評論解決了我的問 導入PyQt5時DLL加載失敗

我卸載了pyqt5並重新conda install --channel https://conda.anaconda.org/bpentz pyqt5

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM