Spyder will not initialize. . . . any ideas

I’ve got the latest of everything on my computer as far as updates and kernel. I’ve got the Spyder programming app installed and it doesn’t initialize. In Konsole this is what I get. . . . any idea’s?

[richardc@richard-AM3 ~]$ spyder
Traceback (most recent call last):
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 568, in _build_master
ws.require(requires)
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 886, in require
needed = self.resolve(parse_requirements(requirements))
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 777, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (spyder-kernels 2.2.0 (/usr/lib/python3.9/site-packages), Requirement.parse(‘spyder-kernels<2.2.0,>=2.1.1’), {‘spyder’})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/bin/spyder”, line 33, in
sys.exit(load_entry_point(‘spyder==5.1.5’, ‘gui_scripts’, ‘spyder’)())
File “/usr/bin/spyder”, line 25, in importlib_load_entry_point
return next(matches).load()
File “/usr/lib/python3.9/importlib/metadata.py”, line 77, in load
module = import_module(match.group(‘module’))
File “/usr/lib/python3.9/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1030, in _gcd_import
File “”, line 1007, in _find_and_load
File “”, line 986, in _find_and_load_unlocked
File “”, line 680, in _load_unlocked
File “”, line 850, in exec_module
File “”, line 228, in _call_with_frames_removed
File “/usr/lib/python3.9/site-packages/spyder/app/start.py”, line 47, in
from spyder.utils.external import lockfile
File “/usr/lib/python3.9/site-packages/spyder/utils/external/lockfile.py”, line 31, in
from spyder.utils.programs import is_spyder_process
File “/usr/lib/python3.9/site-packages/spyder/utils/programs.py”, line 28, in
import pkg_resources
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 3243, in
def _initialize_master_working_set():
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 3226, in _call_aside
f(*args, **kwargs)
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 3255, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 570, in _build_master
return cls._build_from_requirements(requires)
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 583, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File “/usr/lib/python3.9/site-packages/pkg_resources/init.py”, line 772, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The ‘spyder-kernels<2.2.0,>=2.1.1’ distribution was not found and is required by spyder

Today’s update included a kernel for spyder. . . What am I missing here?

Richard :slight_smile:

Sounds like a partial upgrade to me.

What versions of the spyder packages so you have installed? Current should be:

community/python-spyder-kernels 2.2.0-1
    Jupyter Kernels for the Spyder console
community/spyder 5.1.5-2
    The Scientific Python Development Environment

I’ve got spyder 5.1.5-2
python-spyder-kernels 2.2.0-1
python-pyls-spyder 0.4.0-1
What files constitute the Scientific Python Development Environment? Maybe these aren’t installed?

Rich :wink:

Looks like the package versions are misaligned, related to:

https://bugs.archlinux.org/task/72820

Until this is resolved in the repos, option 1 is to edit the PKGBUILD and see if 5.2.0 will build. Option 2 is to use Anaconda to create a conda environment and install and run spyder from within that.

Thankyou for your response. .

Rich :slight_smile:

There’s a new bug report for this specifically:

https://bugs.archlinux.org/task/72913

you could do:

sudo pacman -S python-pip
pip install spyder-kernels==2.1.3

1 Like

Thanks. . … MedB. . . this worked! Program now loads up and runs. . . . .Thanks for your information.

Rich ;:slight_smile:

1 Like

Hey guys.

I installed Endeavour OS recently. I tried to install spyder from the Arch Linux Package Repositories using the command

sudo pacman -S spyder

The installation was successful but when I try to initialize spyder from the terminal, it doesn’t initialize at all. The following message was displayed.

File "/home/ashwin/miniconda3/bin/spyder", line 11, in <module>
    sys.exit(main())
File "/home/ashwin/miniconda3/lib/python3.10/site-packages/spyder/app/start.py", line 248, in main
    from spyder.app import mainwindow
File "/home/ashwin/miniconda3/lib/python3.10/site-packages/spyder/app/mainwindow.py", line 57, in <module>
    from qtpy import QtWebEngineWidgets  # analysis:ignore
File "/home/ashwin/miniconda3/lib/python3.10/site-packages/qtpy/QtWebEngineWidgets.py", line 29, in <module>
    from PyQt5.QtWebEngineWidgets import QWebEnginePage
ImportError: /usr/lib/libgssapi_krb5.so.2: undefined symbol: k5_sname_compare, version krb5_3_MIT

How can this error be rectified?

Welcome to the EndeavourOS forum. I hope you enjoy your time here.

Did you update EndeavourOS before installing spyder? It looks like some python packages may be out of date.

Try

sudo pacman -Syyu spyder

This will update the entire Operating System.

TIP: Always update the OS before installing new packages. Especially one as large as spyder.

HTH

Pudge

Thanks Pudge. I tried uninstalling Spyder. Then updated EOS. And then reinstalled Spyder.

But the same error (stated in my previous thread) persists.