LoginSignup
3
3

More than 5 years have passed since last update.

python で InsecurePlatformWarning が出たので requests[security] をインストールしました

Last updated at Posted at 2015-11-07

python で下記のワーニングがでるようになりました

/usr/local/lib/python2.7/dist-packages/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

こちらに同じような症状の話しがあって、パッケージ requests[security] を下記のようにインストールすると治ると思うよ、との事

sudo apt-get install python-dev libffi-dev build-essential
sudo pip install requests[security]

その後、このワーニングは出なくなりました。よかった。

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3