[Turn] to solve the problem of slow installation pip

Often using Python when you need to install the various modules, and pip is very powerful module installation tool, but often because foreign official pypi wall, resulting in unusable, so we had better be the pip own use source to replace it, so It can be solved due to be installed on the wall trouble library.

There are many online sources available, such as watercress: http://pypi.douban.com/simple/

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

If the demand is only temporary:

temporary use:

-I parameter can be added when using the pip of  https://pypi.tuna.tsinghua.edu.cn/simple

For example: the install PIP -i  https://pypi.tuna.tsinghua.edu.cn/simple  gevent, this will go from the image side of the mounting Tsinghua gevent library.

1, create a hidden directory name is .pip

mkdir ~/.pip

2, enter the directory to create a pip pip.conf file

cd .pip====》touch pip.conf

3, edit the file pip.conf

[global]
index-url = http://pypi.douban.com/simple
[install]
trusted-host = pypi.douban.com


---------------------
Author: wanted bandit scholar
Source: CNBLOGS
Original: https: //www.cnblogs.com/mosson/p/7379854.html
Disclaimer: This article is the author original article, reproduced, please attach Bowen link!
Content analysis By: CSDN, CNBLOG blog articles reprinted a key plug

Guess you like

Origin www.cnblogs.com/admans/p/11545469.html