-
Notifications
You must be signed in to change notification settings - Fork 3
Description
I see this error, when using this in my app:
/app/.venvs/lib/python3.12/site-packages/numerbay/init.py:3: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
https://stackoverflow.com/questions/7446187/no-module-named-pkg-resources
For people finding this question in 2025 or after:
Installing setuptools as proposed by most answers does work, but you should really replace pkg_resources with importlib.
For example, use
from importlib.metadata import version
version("pyjwt")
instead of
import pkg_resources
pkg_resources.get_distribution("pyjwt").version
Read more at https://setuptools.pypa.io/en/latest/pkg_resources.html