Pip install Python libraries using the time-out solution

If you install Python libraries in the country, it is strongly recommended to use watercress source
http://pypi.douban.com/simple/

It can be used as such

pip install -i http://pypi.douban.com/simple/ --trusted-host=pypi.douban.com/simple ipython

Such as installing django

pip install -i https://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com django

Every time this will be very troublesome, configure it under Windows can be configured

1, in C: \ Users \ Administrator \ AppData \ Roaming directory under the new folder pip,

   2, the new pip.ini file in the folder pip, then enter in pip.ini

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

Guess you like

Origin www.cnblogs.com/xu-xu/p/12000052.html