pip download an accelerated manner

Two ways

A temporary way

-I parameter can be added when using the pip of https://pypi.tuna.tsinghua.edu.cn/simple .
Such as downloading or update:

下载:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple tornado
更新:pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade tornado

Second, permanent changes

If you do not want temporary use, you want permanent, you can do this:

Ubuntu environment

So a new directory and file: ~ / the .pip / pip.conf , then writes the following:

[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host = pypi.tuna.tsinghua.edu.cn

After setting, saving, can be used.

Some domestic sources

The new ubuntu require the use of https source, to pay attention,
Tsinghua: https://pypi.tuna.tsinghua.edu.cn/simple

Ali cloud: http://mirrors.aliyun.com/pypi/simple/

China University of Science and Technology: https://pypi.mirrors.ustc.edu.cn/simple/

Huazhong University of Science: http://pypi.hustunique.com/

Shandong University of Technology: http://pypi.sdutlinux.org/

Watercress: http://pypi.douban.com/simple/

Guess you like

Origin www.cnblogs.com/cpl9412290130/p/11601050.html