Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
459 views
in Technique[技术] by (71.8m points)

Python 3.7.0 No module named 'PyQt5.QtWebEngineWidgets'

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

question from:https://stackoverflow.com/questions/51154871/python-3-7-0-no-module-named-pyqt5-qtwebenginewidgets

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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>AppDataLocalProgramsPythonPython<PYTHON-VERSION>Libsite-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.)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...