To Solve AttributeError: module 'setuptools._distutils' has no attribute 'version' Error If You are using pytorch and You are facing this error then You should try to use nightly-release of PyTorch. Now, Your error should be solved.