'Deprecation Warnings: Distutils and netcdf_file
I get two deprecation warnings whenever I try running any python code. They are:
DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
MIN_CHEMFILES_VERSION = LooseVersion("0.9")
DeprecationWarning: Please use netcdf_file from the scipy.io namespace, the scipy.io.netcdf namespace is deprecated.
I am not sure how to use packaging.version instead of distuils and netcdf file. I am running python 3.8. I tried updating my virtualenv as suggested here: DeprecationWarning in Python 3.6 and 3.7 (with Pillow, distutils, imp) This doesn't work for me. Any help will be appreciated.
I could not find results for the second deprecation warning.
Solution 1:[1]
python 3.10
deprecated distutils. this is discussed in detail at https://peps.python.org/pep-0632/. it still works, but you're supposed to stop using it. probably a library you are depending on uses it, so there may or may not be much you can do for the moment if you have to use python 3.10 and you have already upgraded the relevant libraries. it's probably a similar story with scipy.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | burnettk |