Python resources during Installation Retrying (Retry (total = 4, connect = None, read = None, redirect = None, status = None)) ............

问题:安装包出现Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError

Solution: pip install selectivesearch -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

 

Other sources Summary:

Pip collected some domestic sources, as follows:

Ali cloud  http://mirrors.aliyun.com/pypi/simple/

China University of Science and Technology  https://pypi.mirrors.ustc.edu.cn/simple/ 

watercress (douban)  HTTP : //pypi.douban.com/simple/ 

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

University of Science and technology of China  http://pypi.mirrors.ustc.edu.cn/simple/

use The method is simple, direct -i can add url! as follows:

 

 If there is an error:

 

Use the command: # pip install pandas -i http://pypi.douban.com/simple --trusted-host pypi.douban.com

If you want to configure as the default source, as follows:

the need to create or modify configuration files (usually created),

Linux files in ~ / the .pip / pip.conf,

Windows in% HOMEPATH% \ pip \ pip.ini) ,

modify the content as follows:

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

Thus during use pip to install, it will call the default image.

Temporary use of another source installation package python script as follows:

 
Copy the code
1 #!/usr/bin/python
2 import os 3 package = raw_input("Please input the package which you want to install!\n") 4 5 command = "pip install %s -i http://pypi.mirrors.ustc.edu.cn/simple --trusted-host pypi.mirrors.ustc.edu.cn" % package 6 os.system(command)
Copy the code

Guess you like

Origin www.cnblogs.com/carey9420/p/11983468.html