Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

387
Views
AttributeError: module 'setuptools._distutils' has no attribute 'version'

I was trying to train a model using tensorboard. While executing, I got this error:

$ python train.py Traceback (most recent call last): File "train.py", line 6, in <module> from torch.utils.tensorboard import SummaryWriter File "C:\Users\91960\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\utils\tensorboard\__init__.py", line 4, in <module> LooseVersion = distutils.version.LooseVersion

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

I'm using python 3.8.9 64-bit & tensorflow with distutils is already installed which is required by tensorboard.

Why is this happening ? Please help !

over 4 years ago · Hanz Gallego
2 answers
Answer question

0

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==59.5.0

over 4 years ago · Hanz Gallego Report

0

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

over 4 years ago · Hanz Gallego Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!