TensorFlow作为著名机器学习相关的框架,很多小伙伴们都可能要安装它。WIN+R,输入cmd运行后,通常可能就会pip install tensorflow直接安装了,但是由于这个库比较大,接近500M,加上这个是国外链,特别慢,所以需要镜像网站来帮忙。

1.利用镜像安装:

国内知名的镜像网站有很多,比如清华,豆瓣,阿里的镜像,这里推荐豆瓣的,亲测速度达到3M/s,足够满足需求。只需运行cmd后输入

pip install tensorflow -i https://pypi.douban.com/simple

2.报错:

(建议先试着运行下面的代码,再去安装TensorFlow,免得再安装一次)

如果遇到下面的报错:

ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus......

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

如果遇到下面的报错:

ERROR: tensorboard 1.14.0 has requirement setuptools>=41.0.0, but you’ll have setuptools 39.1.0 which is incompatible...

那么可以输入

pip install --upgrade setuptools

 

最后推荐几个不错的镜像网站,备用:
阿里云 
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/

部分参考:https://blog.csdn.net/qq_27512741/article/details/100540148

相关文章:

  • 2022-12-23
  • 2021-09-09
  • 2021-12-29
  • 2021-06-04
  • 2021-05-24
  • 2022-12-23
  • 2021-07-01
  • 2021-07-20
猜你喜欢
  • 2021-06-20
  • 2022-12-23
  • 2021-05-31
  • 2021-09-18
  • 2022-12-23
  • 2021-07-06
  • 2021-11-06
相关资源
相似解决方案