Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
1, the temporary use
When using pip followed by the -i parameter specifies pip source; XXX is the name of the module to be installed
pip install xxx -i https://mirrors.163.com/pypi/simple/
2, the use of permanent changes
mkdir ~/.pip
cd ~/.pip
vi pip.conf
Add or modify pip.conf
[global]
index-url = https://mirrors.163.com/pypi/simple/
3, using
xxx is the module name
pip3 install xxx