pip conda 使用国内源加速
以前使用默认源,有时候下载速度会很慢,所以找了一些国内的pip,conda源,下载的时候可以加速,使用起来也很简单。
国内的pip源,如下:
推荐使用清华源,支持包比较丰富
conda操作
单次使用
| 1 | # conda install tensorflow ``-c mirrors.tuna.tsinghua.edu.cn/anaconda/pk… |
|---|
# 配置清华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操作
单次使用
清华大学 pypi.tuna.tsinghua.edu.cn/simple/
阿里云 mirrors.aliyun.com/pypi/simple…
中国科技大学 pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) pypi.douban.com/simple/
中国科学技术大学 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