Python 在VS代码中调试pyqt5模块时导入错误

Python 在VS代码中调试pyqt5模块时导入错误,python,debugging,visual-studio-code,dll,pyqt5,Python,Debugging,Visual Studio Code,Dll,Pyqt5,我正在使用python为PC开发软件,并将PyQt5用于GUI。我使用的IDE是VS代码。 程序按我的预期运行,GUI也在运行,但当我尝试调试代码时,问题出现了。它给了我这个模块的错误 Exception has occurred: ImportError DLL load failed while importing QtWidgets: The specified procedure could not be found. File "C:\Users\dell\Desktop

我正在使用python为PC开发软件,并将PyQt5用于GUI。我使用的IDE是VS代码。 程序按我的预期运行,GUI也在运行,但当我尝试调试代码时,问题出现了。它给了我这个模块的错误

Exception has occurred: ImportError DLL load failed while importing QtWidgets: The specified procedure could not be found.   File "C:\Users\dell\Desktop\GuiTest\BotFiles - Test Field\GuiConnect.py", line 1, in <module>
    from PyQt5.QtWidgets import QLabel, QLineEdit,QPushButton,QStackedWidget,QMainWindow,QApplication
发生异常:导入QtWidgets时ImportError DLL加载失败:找不到指定的过程。文件“C:\Users\dell\Desktop\GuiTest\BotFiles-Test Field\GuiConnect.py”,第1行,在
从PyQt5.QtWidgets导入QLabel、QLineEdit、QPushButton、QStackedWidget、QMainWindow、QApplication
我已经确认,这些模块确实可以在site packages文件夹中找到

我使用pip安装pyqt5,它是最新的。我正在使用QtDesigner制作GUI布局

我见过类似的问题,但唯一不同的是错误显示“无法找到指定的过程”,但我在遇到的问题中只看到了“模块”。 我不知道这意味着什么,因为应用程序工作正常,但只在调试时抛出此错误。 另外,我有python 3.7(32位)[我错误地安装了它]这可能是一个有问题的因素吗

有关版本的信息:

  • Python 3.8.5(64位)
  • pip 20.2.4
  • PyQt5.15.1

您是否尝试过使用本文提供的方法更新或使用“PyQt5”的其他版本?此外,由于VSCode中的python调试功能是由python扩展提供的,因此建议您重新安装python扩展并重新加载VSCode。