MONAI icon indicating copy to clipboard operation
MONAI copied to clipboard

pkg_resources is deprecated as an API for python 3.13.5

Open mgraugal opened this issue 5 months ago • 1 comments

When installing monai and importing in python 3.13.5, we get a deprecation warning:

Python 3.13.5 (main, Jul 28 2025, 00:00:00) [GCC 11.5.0 20240719 (Red Hat 11.5.0-5)] on linux Type "help", "copyright", "credits" or "license" for more information.

import monai /data/devspace/marc/game-on-autoptz/venv/lib64/python3.13/site-packages/monai/utils/module.py:399: 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. pkg = import(module) # top level module

This would need to be solved in future updates to prevent from breaking

mgraugal avatar Aug 11 '25 15:08 mgraugal

Hi @mgraugal thanks for flagging this. We don't use pkg_resources any more but this might be warned as part of our import process. When this package is removed there shouldn't be a problem and the warning will cease.

ericspod avatar Aug 12 '25 03:08 ericspod