urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.1.0j 20 Nov 2018'. See
时间: 2023-11-21 11:53:55 浏览: 2549
根据提供的引用内容,可以得知问题出在urllib3 v2.0只支持OpenSSL 1.1.1+,而当前的ssl模块是使用OpenSSL 1.1.0j编译的。重新安装OpenSSL 1.1.1后仍然会报错,可能是因为系统环境变量没有正确配置。解决方法是将OpenSSL 1.1.1的路径添加到系统环境变量中,或者使用virtualenv创建一个虚拟环境并在其中安装OpenSSL 1.1.1。
解决方法:
1. 将OpenSSL 1.1.1的路径添加到系统环境变量中。
2. 使用virtualenv创建一个虚拟环境并在其中安装OpenSSL 1.1.1。
示例代码:
```python
# 添加OpenSSL 1.1.1的路径到系统环境变量中
import os
os.environ['PATH'] += ';C:\\OpenSSL-Win64\\bin'
# 使用virtualenv创建虚拟环境并安装OpenSSL 1.1.1
# 安装virtualenv:pip install virtualenv
# 创建虚拟环境:virtualenv venv
# 激活虚拟环境:venv\Scripts\activate
# 安装OpenSSL 1.1.1:pip install pyOpenSSL
```
相关问题
urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.1.0j 20 Nov 2018
根据引用所提供的信息,urllib3 v2.0只支持OpenSSL 1.1.1版本,而当前的ssl模块是使用OpenSSL 1.1.0j版本编译的。所以出现了不兼容的问题。为了解决这个问题,可以尝试重新安装OpenSSL 1.1.1版本,但根据引用的描述,重新安装OpenSSL 1.1.1版本后仍然报错。因此,可能需要采取其他的解决方案。
根据引用提供的信息,可以尝试下载并安装OpenSSL 1.1.0f的源码包版本。这样可以确保所使用的OpenSSL版本与ssl模块编译的版本一致,从而解决兼容性问题。
此外,根据引用的建议,还可以尝试重新安装urllib3并指定版本为1.23,可以通过运行以下命令来实现:
pip install urllib3==1.23 -i https://pypi.tuna.tsinghua.edu.cn/simple
综上所述,你可以尝试以下解决方案:
1. 重新安装OpenSSL 1.1.0f的源码包版本。
2. 重新安装urllib3并指定版本为1.23。
希望以上的解决方案对你有帮助。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [urllib3 v2.0 only supports OpenSSL 1.1.1+,currently the ‘ssl‘ module is compiled with ‘OenSSL ...](https://blog.csdn.net/weixin_48443306/article/details/132178478)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [openssl-1.1.0f.tar.gz](https://download.csdn.net/download/u012422764/10029773)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [解决urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the ‘ssl‘ module is compiled with ...](https://blog.csdn.net/CherryBlossom_/article/details/131465235)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
windows urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.1.0j 20 Nov 2018'
Windows urllib3 v2.0只支持OpenSSL 1.1.1+,而当前的'ssl'模块是使用'OpenSSL 1.1.0j 20 Nov 2018'编译的。这意味着你需要升级你的OpenSSL版本才能使用Windows urllib3 v2.0。
为了解决这个问题,你可以按照以下步骤进行操作:
1. 首先,你需要下载并安装最新版本的OpenSSL。你可以从OpenSSL官方网站(https://www.openssl.org/)下载最新版本的OpenSSL安装程序。
2. 安装完成后,将新版本的OpenSSL添加到系统的环境变量中。这样,Python就能够找到并使用新版本的OpenSSL。
3. 然后,你需要重新编译Python的'ssl'模块,以便它能够与新版本的OpenSSL一起使用。你可以使用pip命令来重新安装'ssl'模块,例如:`pip install --upgrade ssl`。
4. 最后,你可以尝试使用Windows urllib3 v2.0,并确保它能够正常工作。
请注意,升级OpenSSL可能会对其他依赖于旧版本OpenSSL的应用程序产生影响。在进行升级之前,请确保你了解所有可能的影响,并做好相应的备份和测试工作。
相关推荐
![](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)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![7z](https://img-home.csdnimg.cn/images/20210720083312.png)