菜单 学习猿地 - LMONKEY

VIP

开通学习猿地VIP

尊享10项VIP特权 持续新增

知识通关挑战

打卡带练!告别无效练习

接私单赚外块

VIP优先接,累计金额超百万

学习猿地私房课免费学

大厂实战课仅对VIP开放

你的一对一导师

每月可免费咨询大牛30次

领取更多软件工程师实用特权

入驻
401
0

解决国内安装tensorflow, opencv等安装不成功或下载太慢问题(亲自测试了一下,清华大学的超级快(使用后面带-i的方法,无需修改默认下载地址)。我等一晚上无法下载的,3秒内解决问题)

原创
05/13 14:22
阅读数 77217

解决国内安装tensorflow, opencv等安装不成功或下载太慢问题

复制自博客:https://blog.csdn.net/jorg_zhao/article/details/80075293

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

1.1 官方安装方法-适用FQ
tensorflow安装方法比较常见,参考谷歌的官方教程,安装方法如下:

python2版本的安装
pip install --upgrade tensorflow      # for Python 2.*
pip install --upgrade tensorflow-gpu  # for Python 2.* and GPU
python3版本的安装
pip3 install --upgrade tensorflow     # for Python 3.*
pip3 install --upgrade tensorflow-gpu # for Python 3.* and GPU
.2 国内源方法-无需FQ

但是国内网络问题,网速非常慢,如果没有FQ,可以按照下面方法快速安装

# 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版本的快速安装
pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow     # for Python 3.*
pip3 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/

 

发表评论

0/200
401 点赞
0 评论
收藏
为你推荐 换一批