码迷,mamicode.com
首页 > 编程语言 > 详细

Python virtualenv安装库报错SSL: CERTIFICATE_VERIFY_FAILED

时间:2016-09-17 10:43:51      阅读:273      评论:0      收藏:0      [点我收藏+]

标签:

Python virtualenv安装库报错SSL: CERTIFICATE_VERIFY_FAILED

问题描述

使用pip按照virtualenv报错,如下:

pip install virtualenv
Collecting 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 https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
  Could not fetch URL https://pypi.python.org/simple/virtualenv/: There was a problem confirming the ssl certificate: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590) - skipping
  Could not find a version that satisfies the requirement virtualenv (from versions: )

解决办法

使用–trusted-host命令行选项

pip --trusted-host pypi.python.org install virtualenv

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

 

Python virtualenv安装库报错SSL: CERTIFICATE_VERIFY_FAILED

标签:

原文地址:http://www.cnblogs.com/lfoder/p/5878051.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!