Python 2.7 中 Windows 上的 PyQt5:导入 QtWidgets 时出错

PyQt5 on Windows in Python 2.7: Error importing QtWidgets

我在 Windows 7 上为 python 2.7 两个 64 位版本下载了 PyQt5 可执行文件。

安装在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 位)版本兼容吗?