Spyder doesn't start - no module named 'PyQt5.QtWebEngineWidgets'
See original GitHub issueProblem Description
I recently installed Python and Spyder in my computer, but Spyder doesn’t start.
What steps reproduce the problem?
- Download and Install Python 3.7.2
- Open cmd
pip install spyder
python
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:
- Created 5 years ago
- Reactions:11
- Comments:25 (2 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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
to get the fix.
Actually you need to uninstall it first:
pip uninstall pyqtwebengine
pip install pyqtwebengine
This solved it for me.