- 创建目录
mkdir ~/.pip
- 编辑配置文件
~/.pip/pip.conf
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = https://pypi.tuna.tsinghua.edu.cn
- 查看镜像
pip3 config list
global.index-url=‘https://pypi.tuna.tsinghua.edu.cn/simple’
install.trusted-host=‘https://pypi.tuna.tsinghua.edu.cn’
- 其他镜像源
中国科学技术大学 : https://pypi.mirrors.ustc.edu.cn/simple
豆瓣:http://pypi.douban.com/simple/
阿里云:http://mirrors.aliyun.com/pypi/simple/