Use domestic sources to download dependencies in Python

For more Python development content, visit: "Python Flask Development Guide"

PythonThe dependence on the project in development is usually pip installdownloaded with commands. The default official website download source is a foreign network, and download timeout problems often occur. So how to modify the download source so that we can quickly download resources, the following introduces two ways to set the domestic download source.

Domestic download source

First, let's understand the source address of the domestic python download:

https://pypi.tuna.tsinghua.edu.cn/simple/   # 清华
http://pypi.doubanio.com/simple/  # 豆瓣
http://mirrors.aliyun.com/pypi/simple/  # 阿里云
http://pypi.hustunique.com/  # 华中理工大学
http://pypi.sdutlinux.org/ # 山东理工大学
https://pypi.mirrors.ustc.edu.cn/simple/ # 中国科学技术大学
http://mirrors.163.com/pypi/simple/ # 网易

Temporarily modify the download source

If you do not want to permanently modify the download source, pipa parameter is provided to set the current download source address. As follows, download by setting the download sourcematplotlib

Guess you like

Origin blog.csdn.net/chf1142152101/article/details/128242904