{"id":995,"hash":"97f095af23d0149c2a119f5b7c41f294c7b44d38df978019fa0ae9617b88da53","pattern":"SSL InsecurePlatform error when using Requests package","full_message":"Im using Python 2.7.3 and Requests. I installed Requests via pip. I believe it's the latest version. I'm running on Debian Wheezy.\n\nI've used Requests lots of times in the past and never faced this issue, but it seems that when making https requests with Requests I get an InsecurePlatform exception.\n\nThe error mentions urllib3, but I don't have that installed. I did install it to check if it resolved the error, but it didn't.\n\n/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3\n/util/ssl_.py:79: InsecurePlatformWarning: A true SSLContext object is not\navailable. This prevents urllib3 from configuring SSL appropriately and \nmay cause certain SSL connections to fail. For more information, see \nhttps://urllib3.readthedocs.org/en/latest  \n/security.html#insecureplatformwarning.\n\nAny ideas as to why I'm getting this? I've checked the docs, as specified in the error message, but the docs are saying to import urllib3 and either disable the warning, or provide a certificate.","ecosystem":"pypi","package_name":"ssl","package_version":null,"solution":"Use the somewhat hidden security feature:\n\npip install requests[security]\nor\npip install pyOpenSSL ndg-httpsclient pyasn1 \n\nBoth commands install following extra packages:\n\npyOpenSSL\ncryptography\nidna\n\nPlease note that this is not required for python-2.7.9+.\n\nIf pip install fails with errors, check whether you have required development packages for libffi, libssl and python installed in your system using distribution's package manager:\n\nDebian/Ubuntu - python-dev libffi-dev libssl-dev packages.\n\nFedora - openssl-devel python-devel libffi-devel packages.\n\nDistro list above is incomplete.\n\nWorkaround (see the original answer by @TomDotTom):\n\nIn case you cannot install some of the required development packages, there's also an option to disable that warning:\n\nimport requests.packages.urllib3\nrequests.packages.urllib3.disable_warnings()\n\nIf your pip itself is affected by InsecurePlatformWarning and cannot install anything from PyPI, it can be fixed with this step-by-step guide to deploy extra python packages manually.","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/29099404/ssl-insecureplatform-error-when-using-requests-package","votes":237,"created_at":"2026-04-19T04:52:09.110880+00:00","updated_at":"2026-04-19T04:52:09.110880+00:00"}