spyder: Spyder fails to start on Linux
Problem Description
Installed Anaconda on Ubuntu, and it was successful.
However, when i try to launch spyder, I get an error. It is related to PyQt5. I noticed some issues related to the problem I am having: #3383 (https://github.com/spyder-ide/spyder/issues/3383) #3145 (https://github.com/spyder-ide/spyder/issues/3145)
but according to those, this issue was fixed in spyder 3.0 and up… so i am not sure what i am doing wrong…
What steps will reproduce the problem?
- Trying to run spyder spyder
What is the expected output? What do you see instead?
I expect to see an spyder launched, instead i get this error:
"Traceback (most recent call last): File “/home/rmahajan14/anaconda3/lib/python3.6/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 “/home/rmahajan14/anaconda3/bin/spyder”, line 11, in <module> sys.exit(main()) File “/home/rmahajan14/anaconda3/lib/python3.6/site-packages/spyder/app/start.py”, line 144, in main from spyder.app import mainwindow File “/home/rmahajan14/anaconda3/lib/python3.6/site-packages/spyder/app/mainwindow.py”, line 92, in <module> from qtpy import QtWebEngineWidgets # analysis:ignore File “/home/rmahajan14/anaconda3/lib/python3.6/site-packages/qtpy/QtWebEngineWidgets.py”, line 26, in <module> from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage ImportError: libXrender.so.1: cannot open shared object file: No such file or directory "
Paste Traceback/Error Below (if applicable)
PASTE TRACEBACK HERE
Package Versions
- Spyder: 3.2.6
- Python: 3.6.4
- Qt: 5.6.2
- PyQt: 5.6.0
- Operating System: 4.4.0-112-generic GNU/Linux
Dependencies
PASTE DEPENDENCIES HERE
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 20 (4 by maintainers)
For any one arriving here while trying to upgrade the pip installed version of spyder on an Ubuntu 16.04 Linux box the solution that worked for me was:
sudo apt-get install python-pyqt5.qtwebkit
Try python3 -m pip install --upgrade PyQtWebEngine
It work for me.
sudo pip install pyqt5==5.11.2For me, i had some conflicts in installing so i did:
then installing it again using apt:
It works.
I want to install spyder in a docker that based on
pytorch/pytorch. And I also confront this problem. I try many ways and finally fixed the problem. I think the steps may help you.