Open EmmaRenauld opened 1 year ago
Indeed, pkg_resources
is deprecated. I don't see pkg_resources
being imported explicitly in dwi_ml
, so after searching a bit, here's what I'd try:
setuptools
.pip
that this happens, so by using a more recent version of pip
we may solve the problem (in any case, each time we use pip
and there is a newer version, pip
suggests us to install it):
https://github.com/pypa/pip/issues/11975
https://stackoverflow.com/questions/76043689/pkg-resources-is-deprecated-as-an-api/76044568#76044568We can discuss tomorrow/Monday/next week if none of the above works for you.
Thanks!
If it can help, here is my file my_env/bin/dwiml_visualize_logs.py:
# EASY-INSTALL-DEV-SCRIPT: 'dwi-ml==0.1.0.dev0','dwiml_visualize_logs.py'
__requires__ = 'dwi-ml==0.1.0.dev0'
__import__('pkg_resources').require('dwi-ml==0.1.0.dev0')
__file__ = '/home/local/USHERBROOKE/rene2201/my_applications/scil_vital/dwi_ml/scripts_python/dwiml_visualize_logs.py'
with open(__file__) as f:
exec(compile(f.read(), __file__, 'exec'))
(The requests version is now updated and the issue is not fixed, so I deleted previous comments. I can't reproduce a "clean" environment anymore.).
Installing as developper (pip install -e .) makes a warning:
l2t_train_model.py -h:
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html import('pkg_resources').require('dwi-ml==0.1.0.dev0')
In my environment:
cat bin/l2t_train_model.py: The buggy line is: import('pkg_resources').require('dwi-ml==0.1.0.dev0')
See their PR: https://github.com/pypa/setuptools/issues/3878