Skip to content

pkg_resources was removed starting in setuptools==82 #862

@psavery

Description

@psavery

pkg_resources was removed in setuptools. See this issue.

As such, I started getting errors like this when using anaconda-client:

Traceback (most recent call last):
  File "/usr/share/miniconda/envs/hexrd/bin/anaconda", line 6, in <module>
    from anaconda_cli_base.cli import app
  File "/usr/share/miniconda/envs/hexrd/lib/python3.11/site-packages/anaconda_cli_base/cli.py", line 233, in <module>
    load_registered_subcommands(app)
  File "/usr/share/miniconda/envs/hexrd/lib/python3.11/site-packages/anaconda_cli_base/plugins.py", line 282, in load_registered_subcommands
    subcommand_entry_points = _load_entry_points_for_group(PLUGIN_GROUP_NAME)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/hexrd/lib/python3.11/site-packages/anaconda_cli_base/plugins.py", line 57, in _load_entry_points_for_group
    module: typer.Typer = entry_point.load()
                          ^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/hexrd/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/hexrd/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/miniconda/envs/hexrd/lib/python3.11/site-packages/binstar_client/__init__.py", line 16, in <module>
    from pkg_resources import parse_version as pv
ModuleNotFoundError: No module named 'pkg_resources'

Perhaps binstar_client needs to be updated to not use pkg_resources? Or, at least the required version of setuptools should be pinned somewhere.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions