在用pip7.1.2版本安装第三方模块时出现了如下警告:
<code class="hljs avrasm has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;">/usr/lib/python2<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.7</span>/site-packages/pip-<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">7.1</span><span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.2</span>-py2<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">.7</span><span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.egg</span>/pip/_vendor/requests/packages/urllib3/util/ssl_<span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.py</span>:<span class="hljs-number" style="color: rgb(0, 102, 102); box-sizing: border-box;">90</span>: <span class="hljs-label" style="box-sizing: border-box;">InsecurePlatformWarning:</span> A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately <span class="hljs-keyword" style="color: rgb(0, 0, 136); box-sizing: border-box;">and</span> may cause certain SSL connections to fail. For more information, see <span class="hljs-label" style="box-sizing: border-box;">https:</span>//urllib3<span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.readthedocs</span><span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.org</span>/en/latest/security<span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">.html</span><span class="hljs-preprocessor" style="color: rgb(68, 68, 68); box-sizing: border-box;">#insecureplatformwarning.</span></code><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">5</li></ul><ul class="pre-numbering" style="box-sizing: border-box; position: absolute; width: 50px; top: 0px; left: 0px; margin: 0px; padding: 6px 0px 40px; border-right-width: 1px; border-right-style: solid; border-right-color: rgb(221, 221, 221); list-style: none; text-align: right; background-color: rgb(238, 238, 238);"><li style="box-sizing: border-box; padding: 0px 5px;">1</li><li style="box-sizing: border-box; padding: 0px 5px;">2</li><li style="box-sizing: border-box; padding: 0px 5px;">3</li><li style="box-sizing: border-box; padding: 0px 5px;">4</li><li style="box-sizing: border-box; padding: 0px 5px;">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就不会出现警告了
windows下