question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unable to start spyder4 on new machine

See original GitHub issue

Issue 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 (or pip, 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?

  1. install miniconda3
  2. conda create -n spyder-env spyder=4 numpy scipy pandas matplotlib sympy cython
  3. conda activate spyder-env
  4. 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:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
juanis2112commented, Feb 19, 2021

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:

conda create -n spyder-cf -c conda-forge spyder=4.2.1
conda activate spyder-cf
spyder
0reactions
ocean-mattcommented, Apr 7, 2021

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:

(base) $ conda activate py27_spydercf
(py27_spydercf) $ spyder&
[1] 2281
(py27_spydercf) $ Traceback (most recent call last):
  File "/home/users/mpc2g13/miniconda3/envs/py27_spydercf/bin/spyder", line 11, in <module>
    sys.exit(main())
  File "/home/users/mpc2g13/miniconda3/envs/py27_spydercf/lib/python2.7/site-packages/spyder/app/start.py", line 178, in main
    from spyder.app import mainwindow
  File "/home/users/mpc2g13/miniconda3/envs/py27_spydercf/lib/python2.7/site-packages/spyder/app/mainwindow.py", line 90, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
  File "/home/users/mpc2g13/miniconda3/envs/py27_spydercf/lib/python2.7/site-packages/qtpy/QtWebEngineWidgets.py", line 26, in <module>
    from PyQt5.QtWebKitWidgets import QWebPage as QWebEnginePage
ImportError: No module named QtWebKitWidgets

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can no Longer open Spyder IDE for Python Programming
However, since yesterday, I have been unable to open Spyder. I typically open Spyder via the Start Menu, but now, when I try...
Read more >
Unable to Create and/or Activate an ICC Profile in Windows ...
We found the problem that SpyderX, Spyder5 and Spyder4 may not create (save / overwrite) and/or activate the ICC profile correctly in Windows...
Read more >
(Python) Spyder not starting - Ask Ubuntu
I had a related problem. Spyder (version 2.2.5) crashed. I tried to reopen it after rebooting my computer, but nothing happened- clicking on...
Read more >
IPython Console — Spyder 5 documentation
To launch a new IPython instance, go to New console (default settings) under the ... and you will be able to easily test...
Read more >
SpyderUtility message, Windows 10...help please - DPReview
Reboot, run a FullCAL and save the ICC profile under a new name, ... And the fix isn't going to work for you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found