Windows
C:\Users\< 替换为你的用户名 >\AppData\Roaming\pip.conf
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
Linux 配置
阿里云机器
/etc/pip.conf
[global]
index-url=https://mirrors.cloud.aliyuncs.com/pypi/simple/
[install]
trusted-host=mirrors.cloud.aliyuncs.com
非阿里云机器
[global]
index-url=http://mirrors.aliyun.com/pypi/simple
[install]
trusted-host=mirrors.aliyun.com