#67743 closed defect (fixed)

py-pylint: "The 'astroid<=2.14.0-dev0,>=2.12.13' distribution was not found and is required by pylint"

Reported by: mf2k (Frank Schima) Owned by: stromnov (Andrey Stromnov)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: py-astroid py-pylint

Description

When installed py310-spyder does not run.

$ 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 629, 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 966, 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 827, 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 873, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (astroid 2.15.5 (/opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages), Requirement.parse('astroid<=2.14.0-dev0,>=2.12.13'), {'pylint'})

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.3', '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 3327, 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 3301, 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 3339, 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 631, 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 644, 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 827, 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 868, in _resolve_dist
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'astroid<=2.14.0-dev0,>=2.12.13' distribution was not found and is required by pylint

Downgrading py310-astroid fixes the problem.

$ port installed py310-astroid
The following ports are currently installed:
  py310-astroid @2.13.3_0 (active)
  py310-astroid @2.15.5_0
$ port installed py310-spyder
The following ports are currently installed:
  py310-spyder @5.4.3_0 (active)

Change History (3)

comment:1 Changed 16 months ago by reneeotten (Renee Otten)

Cc: reneeotten removed
Port: py-pylint added; py-spyder removed
Summary: py310-spyder: Runtime errorpy-pylint: "The 'astroid<=2.14.0-dev0,>=2.12.13' distribution was not found and is required by pylint"

as is clear from the Traceback, this is not an issue with Spyder but instead an incompatibility between the versions of py-astroid and py-pylint that are currently provided by MacPorts.

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

most likely updating py-pylint to its latest upstream version py-pylint seems to have been updated (port version: 2.15.9, new version: 2.17.4) would resolve that problem, but might then break Spyder because of its annoyingly restrictive versioning caps. I might be able to take a look at this at some point, but not likely in the near future.

comment:3 Changed 16 months ago by reneeotten (Renee Otten)

Resolution: fixed
Status: assignedclosed

In 21d9b2532bc2462cfd4f55c66879b50c22865e1e/macports-ports (master):

py-pylint: update to 2.17.4

Closes: #67743

Note: See TracTickets for help on using tickets.