当前位置 : 主页 > 编程语言 > python >

我在pip安装tensorflow时遇到 ERROR: Cannot uninstall ‘wrapt‘. It is a distutils installed

来源:互联网 收集:自由互联 发布时间:2022-06-15
我在安装 pip install tensorflow时遇到了这样的问题,报错如标题wrapt不能导入 问题:ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thu2 解决方案: pip install -U --ignore-installed wrapt

 

我在安装  pip install tensorflow时遇到了这样的问题,报错如标题wrapt不能导入

问题:ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thu2

解决方案:

pip install -U --ignore-installed wrapt enum34 simplejson netaddr

安装好后,再用pip install tensorflow就安装好了。

 

 

顺便介绍一下镜像源的修改,因为我在解决问题时想过是不是镜像源问题。

我把自己的镜像源改为清华镜像源,这个很简单,就建立一个pip.ini的文件夹,把如下复制粘贴进去,保存就好:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple

当然也有别的镜像源,其实我觉得还是清华最好,想用别的镜像源你改一下网址就好了,比如:

阿里云 ​​http://mirrors.aliyun.com/pypi/simple/​​​   中国科技大学 ​​https://pypi.mirrors.ustc.edu.cn/simple/​​   豆瓣(douban) ​​http://pypi.douban.com/simple/​​   清华大学 ​​https://pypi.tuna.tsinghua.edu.cn/simple/​​   中国科学技术大学 ​​http://pypi.mirrors.ustc.edu.cn/simple/​​

 

 


网友评论