7

I get this issue when trying to run spyder

C:\ProgramData\Anaconda3\Scripts>spyder
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\lib\site-packages\qtpy\QtWebEngineWidgets.py", line 22, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: DLL load failed while importing QtWebEngineWidgets: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\Scripts\spyder-script.py", line 10, in <module>
    sys.exit(main())
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\start.py", line 178, in main
    from spyder.app import mainwindow
  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\app\mainwindow.py", line 90, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "C:\ProgramData\Anaconda3\lib\site-packages\qtpy\QtWebEngineWidgets.py", line 26, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'

I have tried https://www.programmersought.com/article/80564836035/ of pip installing PyQtWebEngine and uninstalling PyQt5-stubs

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Hao S
  • 295
  • 1
  • 2
  • 15

1 Answers1

7

I don't use Spyder, but I ran into this issue and managed to solve it somehow.

I had installed PyQtWebEngine like this: pip install PyQtWebEngine. However, this did not cause the proper Python39\Lib\site-packages\PyQt5\Qt5\bin\Qt5WebEngine.dll file to be created.

The solution:

  • pip uninstall PyQtWebEngine
  • pip uninstall PyQtWebEngine-qt5
  • pip install PyQtWebEngine-qt5
  • pip install PyQtWebEngine

While the prerequisite that installs the Qt5 tooling does end up installed, it is somehow messed up. Install it manually first ensured everything got placed where it was supposed to be.

Stigma
  • 1,686
  • 13
  • 27