例如,安装Selenium时报如下错误:
E:\Coding\Python\Test>pip3 install selenium==3.141.0
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection br
oken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/selenium/
……
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection br
oken by 'ProxyError('Cannot connect to proxy.', OSError(0, 'Error'))': /simple/selenium/
ERROR: Could not find a version that satisfies the requirement selenium==3.141.0
ERROR: No matching distribution found for selenium==3.141.0
解决方案(更换pip源)
pip install boost -i http://mirrors.aliyun.com/pypi/simple --t
rusted-host mirrors.aliyun.com