You are not logged in.

#1 2021-08-01 17:47:25

ppali
Member
Registered: 2021-08-01
Posts: 1

spyder does not start

spyder installed via pacman does not start, seems to be  saying decorator<5 needed. I could not find any missing dependency. Looks like I have to wait for system update. Or does anyone have other ideas?

says decorator, whatever that is, version is too high.

Here is the output when starting 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: (decorator 5.0.9 (/usr/lib/python3.9/site-packages), Requirement.parse('decorator<5'), {'spyder-kernels'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/spyder", line 33, in <module>
    sys.exit(load_entry_point('spyder==5.0.1', '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 "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/usr/lib/python3.9/site-packages/spyder/app/start.py", line 34, in <module>
    from spyder.utils.external import lockfile
  File "/usr/lib/python3.9/site-packages/spyder/utils/external/lockfile.py", line 31, in <module>
    from spyder.utils.programs import is_spyder_process
  File "/usr/lib/python3.9/site-packages/spyder/utils/programs.py", line 28, in <module>
    import pkg_resources
  File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 3243, in <module>
    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 'decorator<5' distribution was not found and is required by spyder-kernels

Last edited by ppali (2021-08-01 17:49:46)

Offline

#2 2021-08-01 18:53:33

lmn
Member
Registered: 2021-05-09
Posts: 67

Re: spyder does not start

This is already known,

As I have just recently helped debugging a friends machine running Manjaro, and this error occurring said distro and but works for me on arch, I want to remind you.

Offline

#3 2021-08-03 11:15:01

Confusioned
Member
Registered: 2021-08-03
Posts: 8

Re: spyder does not start

lmn wrote:

As I have just recently helped debugging a friends machine running Manjaro, and this error occurring said distro and but works for me on arch, I want to remind you.

For me it does still not work on real Arch, how did you get it to work?

Last edited by Confusioned (2021-08-03 11:15:48)

Offline

#4 2021-08-03 15:09:09

lmn
Member
Registered: 2021-05-09
Posts: 67

Re: spyder does not start

I "fixed" it by recompiling python-spyder-kernels with the versioned dependency removed, see diff for more.
I say "fixed" because spyder would start but then hang afterwards. As this was on Manjaro there is no guarantee for the outcome on Arch.

But this was apparently fixed by upstream, and the new workaround still is to rebuild said package and install python-flit-core.
All this is described in greater detail in the comment section of the bug report.

PS: Thanks to you I now know why it worked on my machine, and for my user only.
I had an old version of decorator installed (with pip as my user) and consequently spyder used that one instead of the system version.
As a instable workaround you can install an old version (4.4.2 was the one I had installed) by

pip install --user decorator==4.4.2

but remember this shadows the system version and can lead to other problems. See user install for more.
So If you do that remove it afterwards when the package is fixed in Arch.

Edit: added "workaround"

Last edited by lmn (2021-08-03 15:20:51)

Offline

Board footer

Powered by FluxBB