- cd ~
- mkdir .pip
- cd .pip
- touch pip.conf
then, add the content in the file pip.conf as below:
[global]
index-url = https://mirrors.aliyun.com/pypi/simple/
[install]
use-mirrors = true
mirrors = https://mirrors.aliyun.com/pypi/simple/
trusted-host = mirrors.aliyun.com