解决报错: AttributeError: module ‘distutils‘ has no attribute ‘version‘,亲测有效

AttributeError: module ‘distutils’ has no attribute ‘version’

当搭建号所有的环境的时候,在训练模型的时候,突然报了如上的error。

问题原因

setuptools版本过高

解决方法

安装低版本的setuptools

在pycharm 终端中依次输入:

  1. pip uninstall setuptools
  2. pip install setuptools==59. 5.0 //需要比你之前的低

然后可以继续训练了。

猜你喜欢

转载自blog.csdn.net/qq_44824148/article/details/124692386