question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Spyder doesn't start - no module named 'PyQt5.QtWebEngineWidgets'

See original GitHub issue

Problem Description

I recently installed Python and Spyder in my computer, but Spyder doesn’t start.

What steps reproduce the problem?

  1. Download and Install Python 3.7.2
  2. Open cmd
  3. pip install spyder
  4. python
  5. import spyder; spyder.app.start.main()

What is the expected output? What do you see instead?

Expected opening the GUI, but error occurred.

Paste Traceback/Error Below (if applicable)

Traceback (most recent call last):
  File "C:\Python37\lib\site-packages\qtpy\QtWebEngineWidgets.py", line 22, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

During handling of the above exception, another exception occurred:

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

Versions

  • Spyder version: 3.3.3
  • Python version: 3.7.2 64-bit
  • Qt version: 5.10.0
  • PyQt version: 5.12
  • Operating System name/version: Windows 10

Dependencies

IPython >=4.0     :  7.2.0 (OK)
cython >=0.21     :  0.29.6 (OK)
jedi >=0.9.0      :  0.13.2 (OK)
matplotlib >=2.0.0:  3.0.2 (OK)
nbconvert >=4.0   :  5.4.0 (OK)
numpy >=1.7       :  1.15.4 (OK)
pandas >=0.13.1   :  0.24.1 (OK)
pycodestyle >=2.3 :  2.5.0 (OK)
pyflakes >=0.6.0  :  2.1.0 (OK)
pygments >=2.0    :  2.3.1 (OK)
pylint >=0.25     :  2.2.2 (OK)
qtconsole >=4.2.0 :  4.4.3 (OK)
rope >=0.9.4      :  0.11.0 (OK)
sphinx >=0.6.6    :  1.8.3 (OK)
sympy >=0.7.3     :  1.3 (OK)

Solution

I managed to fix it, by installing an older version of PyQt5, following this discussion on Stack Overflow: https://stackoverflow.com/questions/51154871/python-3-7-0-no-module-named-pyqt5-qtwebenginewidgets

pip install PyQt5==5.10

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:11
  • Comments:25 (2 by maintainers)

github_iconTop GitHub Comments

33reactions
ccordoba12commented, Mar 15, 2019

Thanks for reporting. This is a duplicate of issue #8747 and it’ll be fixed in our next version (3.3.4).

For now you can run

pip install pyqtwebengine

to get the fix.

28reactions
BartBruininkscommented, Jun 6, 2019

Actually you need to uninstall it first: pip uninstall pyqtwebengine pip install pyqtwebengine

This solved it for me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't start spyder because of PyQt5.QtWebKitWidgets
QtWebEngineWidgets import QWebEnginePage ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets' During handling of the above ...
Read more >
spyder-ide/public - Gitter
Any higher version resulted in the same error: ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets' (raised in qtpy\QtWebEngineWidgets, Line 26).
Read more >
ModuleNotFoundError: No module named 'PyQt5' in Python
The Python "ModuleNotFoundError: No module named 'PyQt5'" occurs when we forget to install the PyQt5 module before importing it or install ...
Read more >
ImportError: No module named 'PyQt5.QtWebEngineWidgets'
I'm using a Miniconda distribution on Mac. I had to install both so that I could lunch Spyder pip install PyQtWebEngine pip install...
Read more >
spyder no module named 'cv2' - You.com | The AI Search ...
If that doesn't work, you've got a different problem on your hands unrelated to path-to-import and you should provide more info about your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found