-
Notifications
You must be signed in to change notification settings - Fork 58
Description
Hi, thanks a lot for maintaining AlphaCLIP 🙂
We recently ran into an installation issue when AlphaCLIP is used as a dependency with modern Python packaging environments.
AlphaCLIP currently imports pkg_resources at runtime:
from pkg_resources import packagingUnfortunately, `pkg_resources has been deprecated as an API for some time and has now been removed in setuptools 82.0.0 (2026-02-08 - https://setuptools.pypa.io/en/latest/history.html#v82-0-0).
As a result, installing projects that depend on AlphaCLIP fails with:
ModuleNotFoundError: No module named 'pkg_resources'
when using setuptools ≥82.
Maybe this could be fixed by replacing:
from pkg_resources import packagingwith:
from packaging.version import parse as parse_versionand update usages accordingly, e.g.:
if parse_version(torch.__version__) < parse_version("1.7.1"):Also packaging should be added as an explicit dependency.
This removes the runtime dependency on setuptools internals and restores compatibility with modern setuptools versions.
Happy to open a PR if that helps 🙂