1. 国内常用的pip源
- 阿里云pypi源: http://mirrors.aliyun.com/pypi/simple/ (
推荐
) - 豆瓣pypi源: http://pypi.douban.com/simple (
推荐
)
2. 设置pip默认源
$ mkdir ~/.pip
$ cd ~/.pip/
$ vim pip.conf
pip.conf内容如下:
使用阿里云的pypi源:
[global]
timeout = 6000
index-url = http://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com
or
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
使用豆瓣的pypi源:
[global]
index-url = http://pypi.douban.com/simple
trusted-host = pypi.douban.com
# disable-pip-version-check = true
timeout = 6000
OK, Enjoy it~