InsecurePlatformWarning when using pip on Ubuntu


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

$ pip search reportlab
         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
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.
Author: The pip developers
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python2.7/dist-packages

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?


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
Author: Jean-Paul Calderone
Author-email: [email protected]
License: APL2
Location: /usr/lib/python2.7/dist-packages

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

1 answer


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