NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'.
时间: 2023-11-21 08:53:54 浏览: 24
这个错误是因为你的Python环境中的ssl模块版本与urllib3 v2.0不兼容所导致的。解决这个问题的方法是卸载当前的urllib3模块,然后安装低版本的urllib3模块。你可以按照以下步骤来解决这个问题:
1. 在终端中输入以下命令卸载当前的urllib3模块:
sudo pip uninstall urllib3
2. 安装低版本的urllib3模块。你可以在终端中输入以下命令来安装urllib3的低版本:
pip install urllib3==1.25.11
注意:这里安装的版本号是1.25.11,你也可以根据自己的需要安装其他版本。
3. 运行你的Python脚本,应该就可以成功了。
相关问题
ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with
LibreSSL 2.8.3. 如何解决这个问题?
回答: 这个错误是由于urllib3的新版本需要OpenSSL 1.1.1+以上版本引起的。而当前的ssl模块是使用LibreSSL 2.8.3编译的,不符合要求。解决这个问题的方法是更新ssl模块的版本,使其与urllib3的要求相匹配。具体的解决方法可以参考以下步骤:首先,确保你的Python版本是最新的。然后,可以尝试升级ssl模块,可以通过升级Python本身或者使用pip命令来进行。如果升级ssl模块后仍然出现问题,可以尝试手动编译OpenSSL时添加enable-ssl3配置来启用SSLv3协议。这样就可以解决ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3的问题。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* [Python报错ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the ‘ssl‘ module is ...](https://blog.csdn.net/qq_38122800/article/details/130603051)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with LibreSSL 2.8.3.
这个问题看起来是你在使用urllib3 v2.0时出现的错误。这个错误意味着你的Python 'ssl'模块是使用LibreSSL 2.8.3编译的,而urllib3 v2.0只支持OpenSSL 1.1.1+。要解决这个问题,你需要升级你的Python 'ssl'模块到OpenSSL 1.1.1+版本,或者降级你的urllib3版本到1.x系列。你可以通过升级你的Python版本,或者使用虚拟环境来解决这个问题。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)