Python 3.7.0 No module named 'PyQt5.QtWebEngineWidgets'

PythonPython 3.xPyqt5

Python Problem Overview


I have Python 3.7.0 and I installed PyQt5 with this command:

pip install PyQt5

I have returned this error:

    main.py", line 4, in <module>
    from PyQt5.QtWebEngineWidgets import *
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

In Eclipse I have this configuration:

enter image description here

What may be wrong?

Thanks

Python Solutions


Solution 1 - Python

It has been moved to a separated package.

Based on this answer and my own experience, Just execute in a terminal:

pip install PyQtWebEngine

If you still got problems with PyQt, try uninstalling all of the PyQt related libraries:

pip uninstall PyQt5
pip uninstall PyQt5-sip
pip uninstall PyQtWebEngine

Then install them again, which should fix the following errors:

ModuleNotFoundError: No module named 'PyQt5.sip'
ModuleNotFoundError: No module named 'PyQt5.QtWebEngineWidgets'

If you got problems uninstalling the libraries, go to your Python folder, like:

C:\Users\<USERNAME>\AppData\Local\Programs\Python\Python<PYTHON-VERSION>\Lib\site-packages

and manually delete the PyQt folders, then uninstall everything and install again.

> Make sure you have the latest Python version and upgraded your pip too

Solution 2 - Python

For me, first uninstalling PyQtWebEngine with pip uninstall PyQtWebEngine and then reinstalling with pip install PyQtWebEngine solved the problem of Spyder not starting.

Solution 3 - Python

I have just installed older version of pyqt5

pip install PyQt5==5.7.1

Solution 4 - Python

this is a problem with pyqt5. You can try:

pip install pyqt5==pyqt5.8

or same for conda

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmicheleView Question on Stackoverflow
Solution 1 - PythonNamgyal BrissonView Answer on Stackoverflow
Solution 2 - PythonSuedpolView Answer on Stackoverflow
Solution 3 - Pythonwilk85View Answer on Stackoverflow
Solution 4 - PythonDeveshView Answer on Stackoverflow