carl.b
September 1, 2020, 1:16am
1
Hello everyone. I have installed the python-data-science bundle
(which include spyder-ide) but the program don’t start. It gave me the following :
carl@Clevo-P955-ET1~ $ spyder3
Traceback (most recent call last):
File "/usr/bin/spyder3", line 3, in <module>
start.main()
File "/usr/lib/python3.8/site-packages/spyder/app/start.py", line 200, in main
from spyder.app import mainwindow
File "/usr/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 53, in <module>
requirements.check_qt()
File "/usr/lib/python3.8/site-packages/spyder/requirements.py", line 42, in check_qt
package_name, required_ver = qt_infos[qtpy.API]
KeyError: 'pyside2'
I think the error it’s related to this … (from /usr/lib/python3.8/site-packages/spyder/requirements.py):
def check_qt():
"""Check Qt binding requirements"""
qt_infos = dict(pyqt5=("PyQt5", "5.6"))
try:
import qtpy
package_name, required_ver = qt_infos[qtpy.API]
actual_ver = qtpy.PYQT_VERSION
if LooseVersion(actual_ver) < LooseVersion(required_ver):
show_warning("Please check Spyder installation requirements:\n"
"%s %s+ is required (found v%s)."
% (package_name, required_ver, actual_ver))
except ImportError:
show_warning("Failed to import qtpy.\n"
"Please check Spyder installation requirements:\n\n"
"qtpy 1.2.0+ and\n"
"%s %s+\n\n"
"are required to run Spyder."
% (qt_infos['pyqt5']))
spyder requires PyQt5. I have it installed, from pip list:
…
PyQt5 5.14.1.dev1912311030
…
but it’s not viewed by spyder that view only PySide2 instead.
What can I do?
pip install pyqtwebengine -U
opened 05:16PM - 15 Mar 19 UTC
closed 05:40PM - 15 Mar 19 UTC
## Problem Description
I recently installed Python and Spyder in my computer, b… ut Spyder doesn't start.
### What steps reproduce the problem?
1. Download and Install Python 3.7.2
2. Open cmd
3. ```pip install spyder```
4. ```python```
5. ```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)
```python-traceback
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```
Optionally, you also need to
pip install qdarkstyle watchdog jedi parso -U
Note that it’s recommended to follow spyder
’s guide to install it in a virtual environment:
https://docs.spyder-ide.org/current/installation.html#new-conda-environment
carl.b
September 1, 2020, 4:36am
3
Thanks! now it work, but i have some version problems (jedi and parso are too much up to date in my default python installation). So I will follow your advice and install spyder in a separated conda environment in order to grab every package needed in the correct version required.
It’s best just to use conda’s spyder, instead of the system spyder.