100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > python 安装库 报错 SSL: CERTIFICATE_VERIFY_FAILED 解决方法

python 安装库 报错 SSL: CERTIFICATE_VERIFY_FAILED 解决方法

时间:2021-11-20 10:50:05

相关推荐

python 安装库 报错 SSL: CERTIFICATE_VERIFY_FAILED 解决方法

目录

问题描述

临时解决方法

永久生效方法

问题描述

pip install virtualenvCollecting virtualenv/opt/python27/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:315: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. For more information, see /en/latest/security.html#snimissingwarning.SNIMissingWarningCould not fetch URL /simple/virtualenv/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) - skippingCould not find a version that satisfies the requirement virtualenv (from versions: )

临时解决方法

使用–trusted-host命令行选项

pip --trusted-host install virtualenv

安装其他库的时候只要出现类似错误 均可以使用此方法

永久生效方法

在 $HOME/.pip/pip.conf 中加入trusted-host选项,该方法是一劳永逸

[global]index-url = /pypi/simple/[install]trusted-host=

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。