Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#68456 closed defect (fixed)

py310-python-lsp-server won't run with py310-jedi @0.19.1

Reported by: jbrundle Owned by: reneeotten (Renee Otten)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: stromnov (Andrey Stromnov), tobypeterson
Port: py-python-lsp-server

Description (last modified by jmroot (Joshua Root))

I successfully installed macports Spyder (py310-spyder):

johnrundle@kihei ~ % which spyder
/opt/local/bin/spyder

Question is how to invoke it. This is what I get. (Same if I type: spyder &):

johnrundle@kihei ~ % spyder
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 631, in _build_master
    ws.require(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 968, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 875, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (jedi 0.19.0 (/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages), Requirement.parse('jedi<0.19.0,>=0.17.2'), {'python-lsp-server'})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/local/bin/spyder", line 33, in <module>
    sys.exit(load_entry_point('spyder==5.4.5', 'gui_scripts', 'spyder')())
  File "/opt/local/bin/spyder", line 25, in importlib_load_entry_point
    return next(matches).load()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/metadata/__init__.py", line 171, in load
    module = import_module(match.group('module'))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/spyder/app/start.py", line 62, in <module>
    from spyder.utils.external import lockfile
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/spyder/utils/external/lockfile.py", line 31, in <module>
    from spyder.utils.programs import is_spyder_process
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/spyder/utils/programs.py", line 27, in <module>
    import pkg_resources
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3328, in <module>
    def _initialize_master_working_set():
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3302, in _call_aside
    f(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 3340, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 633, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 646, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 829, in resolve
    dist = self._resolve_dist(
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pkg_resources/__init__.py", line 875, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (jedi 0.19.0 (/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages), Requirement.parse('jedi<0.19.0,>=0.17.2'), {'python-lsp-server'})

Change History (4)

comment:1 Changed 7 months ago by jmroot (Joshua Root)

Cc: stromnov tobypeterson added
Description: modified (diff)
Owner: set to reneeotten
Port: py-python-lsp-server added
Status: newassigned
Summary: Question about macports spyder on Mac mini with M2 chippy310-python-lsp-server won't run with py310-jedi @0.19.1

comment:2 Changed 7 months ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In 04ac016da7b596a09648299817efd354a614ccb0/macports-ports (master):

py-python-lsp-server: remove jedi version cap

Closes: #68456

comment:3 Changed 7 months ago by tobypeterson

Thanks. Real fix is probably to update py-python-lsp-server though...

comment:4 in reply to:  3 Changed 7 months ago by reneeotten (Renee Otten)

Replying to tobypeterson:

Thanks. Real fix is probably to update py-python-lsp-server though...

sure, but if you check the Spyder port (which is up-to-date in MacPorts), you will notice that there python-lsp-server is pinned: 'python-lsp-server[all]>=1.7.4,<1.8.0',, and thus doing so would not solve the problem...

Last edited 7 months ago by reneeotten (Renee Otten) (previous) (diff)
Note: See TracTickets for help on using tickets.