用户目录,创建.pip/pip.conf文件

1
2
3
cd ~
mkdir .pip
vi pip.conf

输入内容

1
2
3
4
5
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/

[install]
trusted-host=mirrors.aliyun.com

其它镜像源