版权声明:版权所有--小宋是呢--个人主页-- https://xiaosongshine.github.io/ 欢迎转载 https://blog.csdn.net/xiaosongshine/article/details/86034145
pip conda 使用国内源加速
以前使用默认源,有时候下载速度会很慢,所以找了一些国内的pip,conda源,下载的时候可以加速,使用起来也很简单。
国内的pip源,如下:
推荐使用清华源,支持包比较丰富
conda操作
单次使用
1 |
|
# 配置清华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 |
|
如果有如下报错:
请使用命令:
1 |
|
# 配置清华PyPI镜像(如无法运行,将pip版本升级到>=10.0.0) pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple