Skip to content

pkg_resources deprecation warning at import #484

Open
@ritvje

Description

@ritvje

Hi! I'm getting the following warning when importing pysteps (version 1.18.0):

Python 3.12.11 | packaged by conda-forge | (main, Jun  4 2025, 14:45:31) [GCC 13.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pysteps
Pysteps configuration file found at: /.pystepsrc

/usr/local/envs/fmippn_dbzhtorate/lib/python3.12/site-packages/pysteps/io/interface.py:52: 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
/usr/local/envs/fmippn_dbzhtorate/lib/python3.12/importlib/__init__.py:131: 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.
  _bootstrap._exec(spec, module)
/usr/local/envs/fmippn_dbzhtorate/lib/python3.12/importlib/__init__.py:131: 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.
  _bootstrap._exec(spec, module)

This seems to be related to the admonition in setuptools documentation about using importlib instead of pkg_resources. I could find this issue by @dnerini from December that probably would fix the warning, but the changes from that seem to have been overwritten at some point?


Conda package version are listed here (the env is quite large)
pysteps_env.txt

Metadata

Metadata

Assignees

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