Skip to content

Fixing Python's insecure platform warning

Here’s how to fix that nagging InsecurePlatformWarning warning in Python.

The issue

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 here.

Assuming you have pip for python installed, read on...

Ubuntu 14.04 fix

sudo apt-get install libffi-dev libssl-dev
sudo pip install -U requests[security]

Comments