请不要安装任何带有警告的软件包InsecurePlatformW

请不要安装任何带有警告的软件包InsecurePlatformW

本文介绍了请不要安装任何带有警告的软件包InsecurePlatformWarning,SNIMissingWarning"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Python版本:2.7.6点子版本:9.0.3

Python version: 2.7.6Pip version: 9.0.3

C:\Python27\Scripts>pip install pyOpenSSL
Collecting pyOpenSSL

以下是安装任何软件包时的错误

c:\ python27 \ lib \ site-packages \ pip_vendor \ urllib3 \ util \ ssl_.py:137:InsecurePlatformWarning:真正的SSLContext对象是 无法使用.这会阻止urllib3正确配置SSL,并可能导致某些SSL连接失败. 您可以升级到较新版本的Python来解决此问题.有关更多信息,请参见 https://urllib3.readthedocs.io/en/ Latest/advanced-usage.html#ssl-warnings 不安全的平台警告 找不到满足认证要求的版本(来自版本:) 找不到pyOpenSSL的匹配发行版

c:\python27\lib\site-packages\pip_vendor\urllib3\util\ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/ latest/advanced-usage.html#ssl-warnings InsecurePlatformWarning Could not find a version that satisfies the requirement certify (from versions: ) No matching distribution found for pyOpenSSL

尝试安装urllib3[secure] --upgrade,但出现以下错误以及InsecurePlatformWarning

Tried installing urllib3[secure] --upgrade, but getting the below error along with InsecurePlatformWarning

尝试安装 SSL中建议的软件包使用请求包时出现InsecurePlatform错误,得到相同的警告问题.

Tried installing the packages suggested in SSL InsecurePlatform error when using Requests package getting the same warning issues.

由于某些限制,我无法升级python版本.还有其他解决方法吗?

I cannot upgrade the python version due to some constraints. Any other way to resolve the issue?

推荐答案

在python状态页中:

From python status page:

大约17小时前发布. 2018年4月8日-世界标准时间15:49

Posted about 17 hours ago. Apr 08, 2018 - 15:49 UTC

所以您需要检查什么是TLS版本您可以通过运行代码来做到这一点:

So you need to check what is your TLS versionyou can do it by running the code:

import json
import urllib2
print json.load(urllib2.urlopen('https://www.howsmyssl.com/a/check'))['tls_version']

如果小于1.2,则可能需要升级python版本.

If it is less than 1.2 you probably need to upgrade your python version.

这篇关于请不要安装任何带有警告的软件包InsecurePlatformWarning,SNIMissingWarning"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 07:29