【问题标题】:How do you fix this error: "ImportError: DLL load failed: The specified module could not be found." using PyQt5如何修复此错误:“ImportError:DLL 加载失败:找不到指定的模块。”使用 PyQt5
【发布时间】:2020-08-11 06:38:31
【问题描述】:

我目前正在使用 Python 3.6.8 和 PyQt5。我的程序运行良好,但在 Windows 更新后,一切都停止了。

这是错误:

Traceback (most recent call last):
  File "main.py", line 10, in <module>
    from PyQt5 import QtWidgets, QtCore, QtGui
ImportError: DLL load failed: The specified module could not be found.

【问题讨论】:

    标签: python python-3.x pyqt pyqt5 python-import


    【解决方案1】:

    我通过在命令提示符下运行以下命令来修复此错误:

    pip install pyqt5-tools
    

    【讨论】:

    • Because pyqt5-tools (5.15.4.3.0.3) depends on both pyqt5-plugins (&lt;empty&gt;) and pyqt5-plugins (&lt;empty&gt;), pyqt5-tools is forbidden.奇数
    【解决方案2】:

    看起来环境变量在更新后已损坏。在最简单的情况下,它应该只是

    添加你的python的DLL位置,例如,

    (C:\Program Files\Python35\DLLs)

    在环境变量中的path。也可以看看其他的possible solutions here

    【讨论】:

    • 感谢您的回复。我重新安装了所有东西(使用下面帖子中的命令),现在它可以工作了。
    猜你喜欢
    • 2020-09-28
    • 1970-01-01
    • 2013-12-10
    • 2016-07-23
    • 2016-08-19
    • 2016-08-22
    • 2018-10-23
    • 2020-04-18
    相关资源
    最近更新 更多