python Chinese source

Python has found the download speed is very slow when you install the library, can be replaced by domestic sources
better domestic Source:
Tsinghua Source: https: //pypi.tuna.tsinghua.edu.cn/simple
watercress Source: http: // pypi. douban.com/simple/
Ali source: http: //mirrors.aliyun.com/pypi/simple/
solution one:
in the name -i pip install the library you want to use source
as

-i https://pypi.tuna.tsinghua.edu.cn/simple install lxml PIP
1
Solution two:
Replace the way: In the c drive C: \ Users% path% \ AppData \ Roaming (% path% for your users under the name) to create a pip of its own folder, create a pip.ini in this file

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

Guess you like

Origin www.cnblogs.com/php-no-2/p/11249937.html