Pip arranged mirror source (rpm)

When installed using pip python extension, should the mirror is not configured domestic source, in the absence over the wall, which will be particularly slow download speed. So, sometimes we have to use domestic mirroring, pip download and install to solve the problem of slow, more commonly used domestic image includes:

Ali cloud: http: //mirrors.aliyun.com/pypi/simple/
watercress: http: //pypi.douban.com/simple/
Tsinghua University: https: //pypi.tuna.tsinghua.edu.cn/simple/
University of Science and technology of China: http: //pypi.mirrors.ustc.edu.cn/simple/
Huazhong University of Science and technology: http: //pypi.hustunique.com/
based on these domestic mirroring source, in the windows system, if the version is less than pip 10.0.0, we can in the user directory (Win XP: C: \ documents and Settings \ Administrator \ pip; Win7 and above systems: \ users \ Username \ pip: C) New pip.ini under, and in the file extended source can be specified, a specific example (an example of Tsinghua University) as follows:

[Global]
index = HTTPS-URL: //pypi.tuna.tsinghua.edu.cn/simple
[the install]
Trusted-Host = pypi.tuna.tsinghua.edu.cn
disable PIP-Check-Version-to true =
timeout = 6000
If pip version> = 10.0.0, the following can be used pip config set global.index-url command is executed, a specific example (example Tsinghua domestic mirroring) as follows:

config-url global.index the SET PIP https://pypi.tuna.tsinghua.edu.cn/simple
PS: if only temporary use of domestic sources, you can use pip install -i command specifies the current installation source that is used in the mirror can, specific examples (to install numpy example) as follows:

 

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple numpy
 
Transfer (https://blog.csdn.net/zhoyuwo/article/details/100140034)

Guess you like

Origin www.cnblogs.com/yigui/p/11863313.html