在安装pytest 时报错。记录一下,也供大家参考。
python pit install pytest
报错信息:WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:817: The handshake operation timed out',))': /simple/pytest/
解决方法:
方法一:
检查网络情况,我是开了fiddler 抓包工具导致的。关了fiddler之后就可以了
方法二:
使用国内的一些pip源:
阿里云 http://mirrors.aliyun.com/pypi/simple/
豆瓣(douban) http://pypi.douban.com/simple/
pip install pytest -i http://pypi.douban.com/simple --trusted-host pypi.douban.com