Recently, the Mac installed in the Python 2.7.11 into Python 3.5.2, and then found that the PIP installation of various modules very egg pain problem, pip although the installation of various classes library is very convenient, directly in the command line input pip install lxml, etc., but the download speed is very slow , and often download timeout, failure, there is a feeling of egg broken, such as the following figure you see what will happen after.
So we need to find a better solution.
First step:
Go to the home path, enter the CD in the terminal ~
Second Step
Enter mkdir. PIP at the terminal
It creates a directory of. Pip
Third Step
Enter the. Pip directory, and the command line enters the CD. Pip
Create pip.conf file, command line input touch pip.conf
Fourth Step
Edit pip.conf file, command line enter Vim pip.conf, then enter I into edit mode
The following code to copy in, here is used in the domestic watercress source, the speed is very fast
[Global]
Index-url = https://pypi.doubanio.com/simple/
[install]
trusted-host=pypi.doubanio.com
Disable-pip-version-check = true
Timeout = 6000
Then press ESC key and press: Key Wq exit, OK here is configured to complete
After the configuration is completed, we look at the download effect, the speed of the