簡體   English   中英

Windows上Python 2.7中的PyQt5:導入QtWidgets時出錯

[英]PyQt5 on Windows in Python 2.7: Error importing QtWidgets

我在Windows 7上為python 2.7下載了PyQt5可執行文件,兩個版本均為64位。

安裝在C:\\ Python27 \\ Lib \\ site-packages \\ PyQt5

我正在嘗試使用上面的代碼:

from PyQt5.QtWidgets import QApplication, QDialog 

我得到錯誤:

ImportError: DLL load failed: The specified module could not be found.

我在以下文件夾中找到了QtWidgets: C:\\Python27\\Lib\\site-packages\\PyQt5\\sip\\PyQt5\\QtWidgets

你有什么主意嗎?

您確定安裝的PyQt5版本與Python版本(32位或64位)兼容嗎?

暫無
暫無

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

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