scil-vital / dwi_ml

Code for people working on machine learning for diffusion MRI
MIT License
9 stars 7 forks source link

Setuptool bug to watch #199

Open EmmaRenauld opened 1 year ago

EmmaRenauld commented 1 year ago

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

jhlegarreta commented 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:

We can discuss tomorrow/Monday/next week if none of the above works for you.

EmmaRenauld commented 1 year ago

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'))
EmmaRenauld commented 1 year ago

(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.).