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