pip安装模块警告InsecurePlatformWarning: A true SSLContext object is not available.

http://blog.csdn.net/henulwj/article/details/48131393/

在用pip7.1.2版本安装第三方模块时出现了如下警告:

<code class="hljs avrasm has-numbering">/usr/lib/python2<span class="hljs-number">.7</span>/site-packages/pip-<span class="hljs-number">7.1</span><span class="hljs-number">.2</span>-py2<span class="hljs-number">.7</span><span class="hljs-preprocessor">.egg</span>/pip/_vendor/requests/packages/urllib3/util/ssl_<span class="hljs-preprocessor">.py</span>:<span class="hljs-number">90</span>: 
<span class="hljs-label">InsecurePlatformWarning:</span> A true SSLContext object is not available. 
This prevents urllib3 from configuring SSL appropriately <span class="hljs-keyword">and</span> may 
cause certain SSL connections to fail. For more information, see 
<span class="hljs-label">https:</span>//urllib3<span class="hljs-preprocessor">.readthedocs</span><span class="hljs-preprocessor">.org</span>/en/latest/security<span class="hljs-preprocessor">.html</span><span class="hljs-preprocessor">#insecureplatformwarning.</span></code><ul style="display: block;" class="pre-numbering"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li></ul>

提示是由于urllib3的SSL连接失败


解决方法

首先安装python-devel libffi-devel openssl-devel

yum install python-devel libffi-devel openssl-devel

之后在安装pyopenssl ndg-httpsclient pyasn1

pip install pyopenssl ndg-httpsclient pyasn1

在运行pip就不会出现警告了


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值