使用pip安装各种模块时出错,出错信息:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, stonnection broken
by 'ProxyError('Cannot connect to proxy.', timeout('_ssl.c:operation timed out'))': /simple/pylint/
解决方法:
出现该错误信息是因为pip源连接证书验证失败,将pip源调整为国内的源就可以了,比如要下载pylint
pip install pylint -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
其中的网址也可改为其他源(注意后面也要做相应修改):
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
文章讲述了在使用pip安装模块时遇到的证书验证错误,原因可能是源连接问题。作者提供了解决方案,即更换为国内的镜像源,如阿里云、中国科技大学、豆瓣等,确保pip安装顺利进行。
2427

被折叠的 条评论
为什么被折叠?



