- 国内PIP源
阿里云 Simple Indexhttp://mirrors.aliyun.com/pypi/simple/
中国科技大学 Simple Indexhttps://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) Simple Indexhttp://pypi.douban.com/simple/
清华大学 Simple Indexhttps://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 Simple Indexhttp://pypi.mirrors.ustc.edu.cn/simple/
- 安装
使用方法很简单,直接 -i 加 url 即可!如下:
1 | pip install web.py -i http://pypi.douban.com/simple |
如果有如下报错:
请使用命令:
1 | pip install web.py -i http://pypi.douban.com/simple --trusted-host pypi.douban.com |
- 配置默认源
如果想配置成默认的源,方法如下:
需要创建或修改配置文件(一般都是创建),
linux的文件在~/.pip/pip.conf,
windows在%appdata%\pip\pip.ini),
修改内容为:
[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host=pypi.douban.com
使用命令配置
pip config set global.trusted-host mirrors.aliyun.com
pip config set global.index-url Simple Index