Solutions to slow installation of PIP install


Today, some friends who have just contacted Python are using PIP install to install Python third-party libraries

There will be some problems such as slow network speed, halfway installation and download, stop, card owner, or download error. The following picture:

There are also some problems, such as in my figure, the download speed is only 4.7kb/s slower than tortoise speed.

How to solve this problem?

Is to replace the python source

The temporary use method is to install PIP install – I + source address + installation library name, which can temporarily solve the installation problem

For example: PIP install – i

In this way, the image of Tsinghua will be installedopencv-pythonThis library

Another way is to permanently modify the source. My method here is to modify it on win10, which is effective through personal test

Under windows, under the directory of C disk and users, find your own computer name and enter the directory

Here my name is administrator

After entering the directory, create a folder named pip

After entering this folder, create a configuration file named pip.ini. Some friends here may not be able to operate it. You can create it as a TXT file first

Open add content, and then change the name to pip.ini

Add Tsinghua’s source address

 index-url =

After saving, modify the configuration file name to pip.ini

At this time, after modification, it can be used. The speed is swish~~~

In Linux environment, modify~/.pip/pip.confIf there is no such file, create one. The directory should be created correctly.

The modification is the same

 index-url =

After modification, it can be used.

Some domestic sources:

The new version of Ubuntu requires the use of HTTPS source, which should be noted.



University of science and technology of China

Huazhong University of Technology:

Shandong University of Technology:



The above is a solution for slow installation of PIP install, a third-party library for Python installation introduced by Xiaobian. I hope it can help you. If you have any questions, please leave a message to me and Xiaobian will reply to you in time. Thank you very much for your support of the developepaer website!
If you think this article is helpful to you, welcome to reprint, please indicate the source, thank you!