赞
踩
1.国内的pip源:
阿里云:
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/
2.修改pip或anaconda的下载源可以提高下载库的速度
如何将下载源改为国内的镜像(例如:清华大学镜像源)
anaconda
永久修改:
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/
conda config --set show_channel_urls yes
换回默认镜像源
conda config --remove-key channels
pip
临时使用
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple some-package
永久修改
pip install pip -U
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
换回默认源
pip config set global.index-url https://pypi.org/simple/
3.清华源给python的pip安装加速(给某个库进行加速):
pip install 库名 -i https://pypi.tuna.tsinghua.edu.cn/simple
例子:安装tensorflow库:
pip install tensorflow-gpu -i https://pypi.tuna.tsinghua.edu.cn/simple
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。