First, Pip introduction
The PIP is the tool that installs the Python package, provides the installation package, lists the packages that have been installed, upgrades the packages, and uninstalls the package features.
The PIP is a replacement for Easy_install and provides the same easy_install as the lookup package, so packages that can be installed using Easy_install can also be installed using the PIP.
Second, the source configuration under Linux
Check if the pip.conf file exists
>> CD ~
>> mkdir. Pip
>> ls ~/.pip
Third, edit the source
Scenario 1: Direct Editing pip.conf
sudo vi ~/.pip/pip.conf
[Global]
Index-url = http://mirrors.aliyun.com/pypi/simple/
[Install]
Programme 2:
Iv. Test Comparison
The speed at which the default source is used:
downloading alembic-0.8.0.tar.gz (918kB) 100% |████████████████████████████████| 921 KB 9.9kb/s Collecting beautifulsoup4==4.4.1 (From-r requirements.txt (line 2)) downloading Beautifulsoup4-4.4.1-py2-n ONE-ANY.WHL (81kB) 100% |████████████████████████████████| 81kB 5.2kb/s Collecting cffi==1.2.1 (From-r requirements.txt (line 3)) downloading cffi-1.2.1.tar.gz (335kB) 100% |████████████████████████████████|
337kB 15kb/s Collecting chardet==2.3.0 (from-r requirements.txt (line 4)) downloading chardet-2.3.0.tar.gz (164kB) 100% |████████████████████████████████| 174kB 9.4kb/s Collecting cryptography==1.0 (From-r requirements.txt (line 5)) downloading cryptography-1.0.tar.gz (33 1kB) 100% |████████████████████████████████| 337kB 7.1kb/s Collecting django==1.8.4 (From-r requirements.txt (line 6)) downloading DJANGO-1.8.4-PY2.PY3-NONE-ANY.W HL (6.2MB) 100% |████████████████████████████████| 6.2MB 16kb/s
speed of using domestic sources:
Collecting alembic==0.8.0 (From-r requirements.txt (line 1)) Downloading http://mirrors.aliyun.com/pypi/packages/9f/e 6/d261c6958d418bcb542b8f79fae7fcf14f7f647f891d42c4ed86a499d690/alembic-0.8.0.tar.gz (918kB) 100% | ████████████████████████████████| 921kB 160kb/s Collecting beautifulsoup4==4.4.1 (From-r requirements.txt (line 2)) downloading HTTP://MIRRORS.ALIYUN.C om/pypi/packages/33/62/f3e97eaa87fc4de0cb9b8c51d253cf0df621c6de6b25164dcbab203e5ff7/ BEAUTIFULSOUP4-4.4.1-PY2-NONE-ANY.WHL (81kB) 100% |████████████████████████████████| 81kB 630kb/s Collecting cffi==1.2.1 (From-r requirements.txt (line 3)) downloading Http://mirrors.aliyun.com/pypi/pac Kages/22/86/b4ae6aeec29105cd2faa07ed2f647349fbcad502d880cb504dca84368853/cffi-1.2.1.tar.gz (335kB) 100% | ████████████████████████████████| 337kB 1.4mb/s Collecting chardet==2.3.0 (from-r requirements.txt (line 4)) downloading Http://mirrors.aliyun.com/pypi /packages/7d/87/4e3a3f38b2f5c578ce44f8dc2aa053217de9f0b6d737739b0ddac38ed237/chardet-2.3.0.tar.gz (164kB) 100% |████████████████████████████████| 174kB 1.1mb/s Collecting cryptography==1.0 (From-r requirements.txt (line 5)) downloading http://mirrors.aliyun.com/p
Ypi/packages/60/1f/8cf32f1fa61efafea7d4fcdcb5080c073f99ada1d2a436527bc392f2f8ea/cryptography-1.0.tar.gz (331kB) 100% |████████████████████████████████| 337kB 1.3mb/s Collecting django==1.8.4 (From-r requirements.txt (line 6))
Relatively speaking, the speed of Ascension is not 1:30, but fly the same ascension.
5. Summary
Well, the above is the entire content of this article, encountered problems to find ways to solve, there are always ways to solve the problems encountered, this is the charm of technology. I hope the content of this article for everyone's study or work can bring certain help, if there is doubt you can message exchange.