以前使用默认源,有时候下载速度会很慢,所以找了一些国内的pip,conda源,下载的时候可以加速,使用起来也很简单。
国内的pip源,如下:
推荐使用清华源,支持包比较丰富
conda操作
单次使用
1
# conda install tensorflow -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
# 配置清华conda镜像
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
pip操作
单次使用
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
使用方法很简单,直接 -i 加 url 即可!如下:
1
# pip install tensorflow -i http://pypi.douban.com/simple
如果有如下报错:
请使用命令:
1
# pip install tensorflow -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
# 配置清华PyPI镜像(如无法运行,将pip版本升级到>=10.0.0)
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
————————————————
版权声明:本文为CSDN博主「小宋是呢」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/xiaosongshine/article/details/86034145