AttributeError: module ‘setuptools._distutils’ has no attribute ‘version’
setuptools 版本过高,需要降级
只需要运行如下命令,即可解决报错:
pip install setuptools==59.5.0
问题解除,可以开始训练了。
报错:AttributeError: module ‘setuptools._distutils’ has no attribute ‘version’解决方法:setuptools 版本过高,需要降级只需要运行如下命令,即可解决报错:pip install setuptools==59.5.0问题解除,可以开始训练!...
webdriver不能启动chrome浏览器,报module ‘selenium.webdriver’ has no attribute”问题解决办法
1、先配置下环境变量(谷歌浏览器为例)
步骤:下载好浏览器驱动chromedriver.exe(下载地址:http://chromedriver.storage.googleapis.com/index.html)
拷贝chromedriver.exe放在谷歌浏览器安装目录下和python安装目录下,环境变量path配置浏览器安装路径(如C:\Program Files (x86)\Google\Chrome\Application)和pyth
在学习《python数据处理》时遇到了安装slate出错,这个问题不仅在slate、在之前按照pycurl时也出现,一直没有解决,原因差不多,都是这个报错,涉及python setup.py egg_info Check the logs for full command output.
报错内容:
ERROR: Command errored out with exit status 1:
command: 'C:\Users\Administrator\AppData\Local\Programs\Python\Python37\python.exe' -c 'import sys, s
无需降级scipy的情况下解决AttributeError: module ‘scipy.misc’ has no attribute ‘imread’,
AttributeError: module ‘scipy.misc’ has no attribute ‘imresize’,
AttributeError:module ‘scipy.misc’ has no attribute ‘imsave’问题
imread,imresize,imsave
最近遇到如下三个错误
AttributeError: module ‘scipy.misc’ has no attribute ‘imread
python3 server.py 127.0.0.1 8888
Traceback (most recent call last):
File “server.py”, line 83, in
main()
File “server.py”, line 76, in main
os.exit()
AttributeError:
module ‘os’ has no
attribute ‘exit’
部分代码入下:
from socket import *
import sys,os
#实现登录
def do_login(s,user,name,addr):
for i in user:
今天安装pymysql时发生了错误
AttributeError:
module ‘pip’ has no
attribute ‘main’
解决方法如下:
1.找到PyCharm 2017.1\helpers\packaging_tool.py
2.打开packaging_tool.py,注意,最好用pycharm打开,因为这样可以直接定位到104行左右的位置
3.找到104行,会看到两个函数:
def do_install(pkgs):
import pip
except ImportError:
error_no_pip()
问题
解决:
AttributeError:
module ‘paddle.fluid’ has no
attribute ‘EndStepEvent’问题描述
解决思路问题
解决
在使用paddle.fluid导入EndStepEvent过程中
global step
if isinstance(event, fluid.EndStepEvent):
if event.step == 0:
plot_cost.append('Train Cost', step, event.metrics[0])
引用和指出了出现AttributeError: module 'distutils' has no attribute 'version'的问题。这个错误通常是由于setuptools包的版本问题引起的。在setuptools v59.6.0及更高版本中,distutils模块的version属性已经被弃用,因此在使用较新版本的setuptools时会报错。引用中提到了一个解决方法,即降低setuptools的版本。可以通过执行以下命令解决问题:
pip uninstall setuptools
pip install setuptools==59.5.0
通过将setuptools的版本降低到59.5.0,可以避免出现AttributeError错误。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [调用Tensorboard时报错AttributeError: module ‘setuptools._distutils‘ has no attribute ‘version](https://blog.csdn.net/fightforglory/article/details/123782837)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
- *2* [AttributeError: module ‘distutils‘ has no attribute ‘version](https://blog.csdn.net/weixin_37989267/article/details/127154804)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]