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