Skip to content

Build fails with setuptools 81+ due to pkg_resources removal #528

@mabunassar

Description

@mabunassar

Description

Problem

CLIP fails to build with setuptools 82+ because setup.py imports pkg_resources, which was removed in setuptools 81 (08 Feb 2026).

ModuleNotFoundError: No module named 'pkg_resources'

The failing line in setup.py:

from pkg_resources import packaging

Suggested fix

Replace pkg_resources.packaging with packaging from the standalone packaging library:

  # Before
  from pkg_resources import packaging

  # After
  import packaging.version

And add packaging to the build dependencies in setup.py or migrate to a pyproject.toml build system.

Workaround

Pin setuptools to <81 and disable build isolation for CLIP.

Environment

  - Python 3.11
  - setuptools 82+
  - uv / pip

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