0

In my windows system and pytorch environment, when I import matplotlib I came up an error as follows:

import matplotlib Traceback (most recent call last): File "", line 1, in File "D:\Anaconda\envs\pytorch_gpu\lib\site-packages\matplotlib_init_.py", line 105, in from packaging.version import parse as parse_version ModuleNotFoundError: No module named 'packaging.version'

I learned that this error may be caused by not installing setuptools(see: ImportError: No module named packaging.version), but I checked that I had setuptools and packaging installed. I have also try to uninstall the setuptools-59.5.0 and install a lower version as described in No module named pkg_resources, but it still did not work for me. Now my pip list is shown as follows:

enter image description here

enter image description here

enter image description here

Is there any solution? I'm so dazed.

0 Answers0