ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.1.0j 20 Nov 2018'. See:
时间: 2024-06-18 09:02:50 浏览: 177
这个错误提示说明你的程序依赖的urllib3库版本为v2.0,而你的Python环境中的ssl模块版本为OpenSSL 1.1.0j,低于v2.0所需的最低版本OpenSSL 1.1.1。建议升级你的OpenSSL版本或者使用适合当前OpenSSL版本的urllib3版本。
可以尝试以下步骤解决问题:
1. 升级你的OpenSSL版本到1.1.1或以上。
2. 将你的urllib3版本降级到适合当前OpenSSL版本的版本。
3. 如果你使用的是conda环境,可以使用以下命令升级OpenSSL:
conda update openssl
4. 如果你使用的是pip安装的urllib3,可以使用以下命令升级urllib3:
pip install --upgrade urllib3
相关问题
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.1.0j 20 Nov 2018'.
这个错误是由于urllib3在新版本中要求OpenSSL 1.1.1或更高版本,而当前的ssl模块编译使用的是OpenSSL 1.1.0j引起的。 这个问题可以通过升级或更改ssl模块来解决。
解决方法之一是升级ssl模块的OpenSSL版本到1.1.1或更高版本。您可以按照OpenSSL官方文档的指导进行升级。
另一种解决方法是降级urllib3的版本,以适应当前的ssl模块版本。您可以在urllib3的GitHub问题页面上找到更多关于该问题的信息和解决方案。
请注意,针对ssl模块和OpenSSL版本的修改可能涉及到系统的更改,所以在执行这些操作之前,请确保您对系统和相关工具有足够的了解。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the ‘ssl‘ module is compiled wi](https://blog.csdn.net/qq_42873925/article/details/131112721)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [python报错:ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+](https://blog.csdn.net/inthat/article/details/131365519)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the ‘ssl’ module is compiled with OpenSSL 1.1.0h 27 Mar 2018.
这个错误是由于urllib3版本需要使用OpenSSL 1.1.1或以上版本而当前的ssl模块编译是使用的OpenSSL 1.1.0h版本引起的。 问题的解决方法是更新ssl模块的编译版本,使其兼容urllib3 v2.0所需的OpenSSL 1.1.1版本。具体的解决方法如下:
1. 首先,你需要检查你的系统中是否已经安装了OpenSSL 1.1.1或更高版本。如果已经安装,则需要确认Python使用的是正确的OpenSSL版本。你可以使用命令`openssl version`检查当前系统中使用的OpenSSL版本。
2. 如果你没有安装OpenSSL 1.1.1或更高版本,你需要按照官方文档或指南下载和安装最新版本的OpenSSL。
3. 安装完成后,你需要重新编译ssl模块以使用新版本的OpenSSL。具体的操作方式可能因系统而异,你可以查阅Python官方文档或相应的资源来了解如何编译并更新ssl模块。
4. 完成ssl模块的更新后,你可以再次运行你的代码,应该就不会再出现这个错误了。
注意:在进行任何更新或更改之前,请务必备份你的代码和相关文件,以防止意外损失。