unable to start spyder4 on new machine
See original GitHub issueIssue Report Checklist
- [x ] Searched the issues page for similar reports
- [ x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
- [x ] Reproduced the issue after updating with
conda update spyder
(orpip
, if not using Anaconda) - [n/a ] Could not reproduce inside
jupyter qtconsole
(if console-related) - [x ] Tried basic troubleshooting (if a bug/error)
- [ x] Restarted Spyder
- [x ] Reset preferences with
spyder --reset
- [x ] Reinstalled the latest version of Anaconda
- [x ] Tried the other applicable steps from the Troubleshooting Guide
- [x ] Completed the Problem Description, Steps to Reproduce and Version sections below
Problem Description
trying to get spyder running on brand new machine. installed miniconda per instructions installed spyder4 (and common spyder packages) per instructions
It crashes complaining about an undefined symbol in libgobject:
Traceback (most recent call last):
File "miniconda3/envs/spyder-env/lib/python3.8/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: miniconda3/envs/spyder-env/lib/python3.8/site-packages/PyQt5/../../.././libgobject-2.0.so.0: undefined symbol: g_uri_ref
tried removing the spyder environment and deleting miniconda, then reinstalling… same error. tried installing spyder to a different environment, same error. i also tried running directly from spyder sources in envs/spyder-env/sitepackages/spyder/app, same error.
when i grep that file for the symbol, it matches:
$ grep g_uri_ref miniconda3/envs/spyder-env/lib/python3.8/site-packages/PyQt5/…/…/…/./libgobject-2.0.so.0 Binary file miniconda3/envs/spyder-env/lib/python3.8/site-packages/PyQt5/…/…/…/./libgobject-2.0.so.0 matches
What steps reproduce the problem?
- install miniconda3
- conda create -n spyder-env spyder=4 numpy scipy pandas matplotlib sympy cython
- conda activate spyder-env
- spyder &
What is the expected output? What do you see instead?
typically the spyder splash screen opens and then the interface and window components.
instead, getting error below and then spyder quits.
Paste Traceback/Error Below (if applicable)
Traceback (most recent call last):
File "/home/username/work/miniconda3/envs/spyder-env/lib/python3.8/site-packages/qtpy/QtWebEngineWidgets.py", line 22, in <module>
from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: /home/username/work/miniconda3/envs/spyder-env/lib/python3.8/site-packages/PyQt5/../../.././libgobject-2.0.so.0: undefined symbol: g_uri_ref
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "start.py", line 232, in <module>
main()
File "start.py", line 210, in main
from spyder.app import mainwindow
File "/home/username/work/miniconda3/envs/spyder-env/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 65, in <module>
from qtpy import QtWebEngineWidgets # analysis:ignore
File "/home/username/work/miniconda3/envs/spyder-env/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'
Versions
- Spyder version: 4.2.1
- Python version: 3.8
- Qt version: 5.9.7
- PyQt version: 5.9.2
- Operating System name/version: linux mint 20.1
Dependencies
n/a
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Hi @pracplayopen, I think there might be a problem in Anaconda with dependencies in spyder. I suggest trying to install Spyder from Conda-forge. Please run the following commands in your terminal to install and run spyder from Conda-forge:
Hi @juanis2112,
Your fix sadly didn’t work for me. I’m having the same problems as @pracplayopen. As per your fix, I created a new completely independant Conda environment, and installed the package using conda-forge. Note that I’m installing with Python 2.7 and Spyder = 3* due to having to run some legacy code:
$ conda create -n py27_spydercf -c conda-forge spyder=3 python=2.7
Here’s the traceback after installation and attempted opening of Spyder:
This is exactly the same traceback I’ve had when dealing with existing environments loaded using the default Conda channels. I couldn’t find any other solutions elsewhere, but if there are please do point me in their direction. I’ve even tried loading Spyder 4 with Python 3.7 in a separate environment Any further advice would be much appreciated. Thanks in advance!