PIP Mirror Configuration
After setting up the Python
environment, since downloading packages from the pypi
repository can be slow over domestic networks, it is recommended to configure pip
mirrors. This can speed up downloads and avoid dependency installation failures. You can choose to configure one of the following two mirrors.
-
Alibaba Mirror (Recommended)
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
pip config set install.trusted-host mirrors.aliyun.com -
Tsinghua Mirror
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple/
pip config set install.trusted-host pypi.tuna.tsinghua.edu.cn