您的位置:首页 > 移动开发 > Objective-C

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

2015-12-22 22:20 519 查看
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就不会出现警告了
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: