InsecurePlatformWarning when using pip on Ubuntu

5

I am observing an alert message (not an error) InsecurePlatformWarning when executing the pip command in Linux:

$ pip search reportlab
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90:
         InsecurePlatformWarning: A true SSLContext object is not available.
         This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail.
         For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
reportlab           - The ReportLab Toolkit

I have the latest version of pip installed:

$ pip show pip
---
Metadata-Version: 2.0
Name: pip
Version: 7.1.2
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: 

I'm using Python 2.7.6.

In previous versions I did not show this message. I understand that you are indicating to me that my platform is insecure, how or what do I have to install to avoid receiving this alert?

Update:

I already have the latest version of PyOpenSSL installed:

$ pip show pyOpenSSL
---
Metadata-Version: 1.0
Name: pyOpenSSL
Version: 0.13
Summary: Python wrapper module around the OpenSSL library
Home-page: http://pyopenssl.sourceforge.net/
Author: Jean-Paul Calderone
Author-email: [email protected]
License: APL2
Location: /usr/lib/python2.7/dist-packages
Requires: 

If I try to install request[security] , it gives me the following message:

$ pip install 'request[security]'
requests 2.2.1 does not provide the extra 'security'
    
asked by César 02.12.2015 в 15:39
source

1 answer

3

I respond after consulting the equivalent English response and "debugging" in the comments

You just have to install the security packages:

pip install requests[security]

or install them directly:

pip install pyopenssl ndg-httpsclient pyasn1

If in Ubuntu you have problems installing pyopenssl , you should also install the following dependencies:

apt-get install libffi-dev libssl-dev
    
answered by 02.12.2015 / 16:00
source