使用清华开源镜像安装tensorflow

转自:https://www.cnblogs.com/geeksongs/p/10745419.html

安装tensorflow时,如果使用直接安装速度相对较慢,采取清华大学的镜像会提高速度。

GPU版本安装方法:

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

豆瓣镜像安装

pip install tensorflow-gpu==1.8 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

pytorch 下载镜像

pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html

备注:安装的时候需要python是64位版本,32位版本则会报错,笔者本人用一年的时间来才发现了这个错误