您当前的位置:首页 > 计算机 > 编程开发 > Python

tensorflow_gpu版本下载速度慢(已解决,包含多个镜像链接)

时间:08-19来源:作者:点击数:
城东书院 www.cdsy.xyz

好久没搞算法了,最近,给电脑装了一个GPU,2080Ti,看着这么好的配置,不跑几个网络,感觉对不起她!

之前装过tensorflow,但不是gpu版本,而且已经是两年前了

所以就来一套tensorflow_gpu(1.14.0)版本+cuda(10.0)+cudnn(7.4)组合拳,cuda、cudnn下载安装都挺快的

奈何tensorflow下载的跟蜗牛一样!还经常time out error!!!

经过一番冲浪,找到了一条高速通路,通过镜像资源下载!具体命令如下:

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu

指定具体版本号

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu1.14.0

还可以防止time out:

pip --default-timeout=1000000 install -U -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow-gpu==1.14.0

上面的example是清华的镜像源,我试过,也是慢的跟蜗牛一样,选择下面合适的镜像源,

清华:https://pypi.tuna.tsinghua.edu.cn/simple

阿里云:http://mirrors.aliyun.com/pypi/simple/

中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/

华中理工大学:http://pypi.hustunique.com/

山东理工大学:http://pypi.sdutlinux.org/

豆瓣:http://pypi.douban.com/simple/

你就会发现新大陆了,我改成阿里云之后,pip --default-timeout=1000000 install -U -i http://mirrors.aliyun.com/pypi/simple/ --upgrade tensorflow-gpu==1.14.0

感人的进度条,哭了!

如果 出现

WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.aliyun.com'.

命令后面加 --trusted-host mirrors.aliyun.com  即

pip --default-timeout=1000000 install -U -i http://mirrors.aliyun.com/pypi/simple/ --upgrade tensorflow-gpu==1.14.0 --trusted-host mirrors.aliyun.com

城东书院 www.cdsy.xyz
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门
本栏推荐