When pip download and install python associated libraries, download speed is too slow solution to the problem (using the -i parameter) (attached Domestic Source: watercress, Tsinghua University, USTC, etc.)

When pip download and install python associated libraries, download speed is too slow solution to the problem (using the -i parameter) (attached Domestic Source: watercress, Tsinghua University, USTC, etc.)

In a recent use pip to install python associated libraries (installed pyinstaller), found that the use of "pip install pyinstaller" command, the download speed is too slow, more than a dozen KB of speed, but the library tens of megabytes of it, ah, but I can not stand of.

So the Internet Baidu found a solution, the speed of a sudden put up, very, very happy. So here share. ^ - ^
Here Insert Picture Description

First to a wave of domestic sources:

Tsinghua source : https: //pypi.tuna.tsinghua.edu.cn/simple

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

USTC source : https: //pypi.mirrors.ustc.edu.cn/simple/

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

Temporary Use

When using pip for installation, plus domestic sources can be.

For example:
PIP https://pypi.tuna.tsinghua.edu.cn/simple the install django -i
This will Tsinghua from side to install django the mirror.

Permanent changes, permanent use

linux, the
modified ~ / .pip / pip.conf (not create one), to modify the index-url Tuna, as follows:
[Global]
index-url = https://pypi.tuna.tsinghua.edu.cn/ simple
can be.

the windows,
to create a directory directly pip user directory, such as: C: \ Users \ xx \ pip, new file pip.ini, as follows:
[Global]
index = HTTPS-URL: //pypi.tuna.tsinghua. edu.cn/simple
can be.

pip install install the specified version of the package

When use pip Python package specified version installed, simply by "==" operator can be specified.

pip install beagle == 0.2.0
This will install the 0.2.0 version of the beagle.

Published 34 original articles · won praise 55 · views 9880

Guess you like

Origin blog.csdn.net/weixin_43996007/article/details/104124597