gpt4 book ai didi

python - 导入 PyQt5 时 DLL 加载失败

转载 作者:IT老高 更新时间:2023-10-28 20:51:18 24 4
gpt4 key购买 nike

我已经在 windows 平台上安装了 PyQt5,并得到一个 importError: DLL load failed。

我已经使用命令安装了pyqt5

pip3 install pyqt5
Successfully installed pyqt5-5.8.1

我的Python版本如下:

Python 3.5.2 |Anaconda custom (64-bit)| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32

导入错误如下:

from PyQt5.QtWidgets import QApplication
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: DLL load failed: The specified module could not be found.

感谢和问候

最佳答案

是因为缺少Python3.dll(stub dll,重新导出Python3x.dll函数,所以一个版本的扩展可以适用于多个版本 python )。

如果您的 Python 发行版没有捆绑 python3.dll,您可以尝试使用 WinPython (https://winpython.github.io/) 中的一个。

至少 2017/04/01 版本应该有它。

1) 下载 WinPython(“零”版本就足够了;必须与您的 Python 相同的“主版本” - 3.5/3.6 - 和“位” - 32/64 - !!!)。

2) 解压到某个临时目录,获取 python3.dll 并将其粘贴到 python 目录中,靠近 python3x.dll。

3) 享受工作的 QT

关于python - 导入 PyQt5 时 DLL 加载失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42863505/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com