Procedure:
Fresh installed conda.
conda update anaconda
conda install spyder=4.1.3
Output:
$ /opt/anaconda/bin/spyder | xclip
Traceback (most recent call last):
File "/opt/anaconda/lib/python3.7/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 "/opt/anaconda/bin/spyder", line 11, in <module>
sys.exit(main())
File "/opt/anaconda/lib/python3.7/site-packages/spyder/app/start.py", line 201, in main
from spyder.app import mainwindow
File "/opt/anaconda/lib/python3.7/site-packages/spyder/app/mainwindow.py", line 84, in <module>
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/opt/anaconda/lib/python3.7/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'
I do have python-pyqtwebengine installed on my system. I am running arch linux.
I a lso have python on my system but i already tried removing PyQt5 and pyqtwebengine using my system's pip and reinstalling and in both ways i always had this same missing QtWebEngine error.
I saw many errors like this on the issues here and they always end up like that's not a spyder problem, but maybe we need better installing instructions?
This is not issue with Spyder but with Anaconda. Please report it here:
I saw many errors like this on the issues here and they always end up like that's not a spyder problem, but maybe we need better installing instructions?
I don't think so (installing Anaconda is quite straightforward). People just need to avoid mixing pip, conda and system packages (as it seems you're doing).
The fix for me was:
pip install PyQt5
Using the system wide pip and never run pip as root(pip for python 3, can be pip3 in some systems)
Then it still didn't work, then I reinstalled with:
pip uninstall PyQt5-sip
pip uninstall PyQt5
pip install PyQt5
All with the system python and it worked.
Same problem but in windows 10 can someone help me solve it "No module named 'PyQt5.QtWebEngineWidgets'"
Hi @MufaddalHamid please check our Troubleshooting Guide maybe something there could be useful :)
This issue is still happening for me. The Troubleshooting Guide did not help. I have tried installing various versions of PyQt5, and I always get errors.
I did a fresh install of Anaconda (latest version) on Ubuntu 20.4. The resultant error when I run Spyder directly after install:
~$ spyder
Traceback (most recent call last):
File "/home/bbutler3/anaconda3/lib/python3.8/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: libXss.so.1: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/bbutler3/anaconda3/bin/spyder", line 11, in <module>
sys.exit(main())
File "/home/bbutler3/anaconda3/lib/python3.8/site-packages/spyder/app/start.py", line 201, in main
from spyder.app import mainwindow
File "/home/bbutler3/anaconda3/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 84, in <module>
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/home/bbutler3/anaconda3/lib/python3.8/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'
Please provide advice if possible.
I have solved my issue. Sorry for the multiple comments, but I want to help anyone else who may run into this. I think it was a Ubuntu libraries problem. After sudo apt-get install libxss1
to fix the ImportError
, I got another one that was basically identical:
ImportError: libEGL.so.1: cannot open shared object file: No such file or directory
It took a little digging to find the right package this time, but I did sudo apt-get install libegl1-mesa
, and Spyder worked after that! I'm using WSL 2 here, so I did have to fiddle with my X display settings, but that's a different issue. Anyway, I hope this helps anyone who may come looking, and saves the Spyder developers from more work in explaining.
I solved my issue by getting fresh installation of python and anaconda i.e python 3.9 and anaconda 3
@bbutler3. I have the same problem!!! tried to fix it with your steps, but I can麓t solve it :
Traceback (most recent call last):
File "/home/maxi/miniconda3/lib/python3.8/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: libQt5WebEngineWidgets.so.5: cannot open shared object file: No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/maxi/miniconda3/bin/spyder", line 11, in
sys.exit(main())
File "/home/maxi/miniconda3/lib/python3.8/site-packages/spyder/app/start.py", line 208, in main
from spyder.app import mainwindow
File "/home/maxi/miniconda3/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 84, in
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/home/maxi/miniconda3/lib/python3.8/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in
from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ModuleNotFoundError: No module named 'PyQt5.QtWebKitWidgets'
It麓s Spyder 4.2.0....could you help me please!?
@mvazquezmassaro, that looks like an error in your installation. Please create a new environment and install Spyder on it, or remove and reinstall Miniconda again.