解决国内安装Tensorflow太慢的问题

1. 安装tensorflow官方方法与使用国内源方法


1.1 官方安装方法-适用climb over the wall你懂得
tensorflow安装方法比较常见,参考谷歌的官方教程,安装方法如下:

一般安装:

pip install --upgrade tensorflow     # for Python 3.*
pip install --upgrade tensorflow-gpu # for Python 3.* and GPU



1.2 国内源方法-无需climb over the wall你懂得
但是国内网络问题,网速非常慢,如果没有翻墙,可以按照下面方法快速安装

python2版本的快速安装

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow      # for Python 2.*
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu  # for Python 2.* and GPU


python3版本的快速安装

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow     # for Python 3.*
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu # for Python 3.* and GPU


以上是使用清华的镜像源地址,也可使用下面的镜像地址替换清华源地址:

阿里云 
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/
 

发布了110 篇原创文章 · 获赞 17 · 访问量 11万+

猜你喜欢

转载自blog.csdn.net/qq_38890412/article/details/104339698