AttributeError: module ‘distutils‘ has no attribute ‘version‘ Or no graph when use tensorboard

created at 05-29-2022 views: 41

reason

setuptools version is too high

You can use pip list to view your own version number,

solution

# Activate your own environment
conda activate pytorch1
# Check the relevant configuration version, in this step you can find that my setuptools version number is 59.6.0
pip list
# downgrade version
pip install setuptools==59.5.0

After re-running, no error is reported:

AttributeError: module 'distutils' has no attribute 'version'

You can also see the rendering of the grap using tensorboard

created at:05-29-2022
edited at: 05-29-2022: