AttributeError: module ‘setuptools._distutils’ has no attribute ‘version’

We Are Going To Discuss About AttributeError: module ‘setuptools._distutils’ has no attribute ‘version’. So lets Start this Python Article.

AttributeError: module ‘setuptools._distutils’ has no attribute ‘version’

  1. How to solve AttributeError: module 'setuptools._distutils' has no attribute 'version'

    This is a known bug which has been patched: https://github.com/pytorch/pytorch/pull/69904
    You can either use the nightly-release of PyTorch, or otherwise downgrade setup tools to setuptools version 59.5.0:
    pip install setuptools==59.5.0

  2. AttributeError: module 'setuptools._distutils' has no attribute 'version'

    This is a known bug which has been patched: https://github.com/pytorch/pytorch/pull/69904
    You can either use the nightly-release of PyTorch, or otherwise downgrade setup tools to setuptools version 59.5.0:
    pip install setuptools==59.5.0

Solution 1

This is a known bug which has been patched: https://github.com/pytorch/pytorch/pull/69904

You can either use the nightly-release of PyTorch, or otherwise downgrade setup tools to setuptools version 59.5.0:

pip install setuptools==59.5.0

Original Author match Of This Content

Solution 2

This command did the trick for me:

python3 -m pip install setuptools==59.5.0

pip successfully installed this version:

Successfully installed setuptools-60.1.0 instead of setuptools-60.2.0

Original Author zoph Of This Content

Conclusion

So This is all About This Tutorial. Hope This Tutorial Helped You. Thank You.

Also Read,

ittutorial team

I am an Information Technology Engineer. I have Completed my MCA And I have 4 Year Plus Experience, I am a web developer with knowledge of multiple back-end platforms Like PHP, Node.js, Python and frontend JavaScript frameworks Like Angular, React, and Vue.

Leave a Comment