pip安裝模組警告InsecurePlatformWarning: A true SSLContext object is not available.

來源:互聯網
上載者:User

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就不會出現警告了

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.