urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.1.0h 27 Mar 2018
时间: 2023-10-13 22:02:51 浏览: 182
openssl-1.1.0f.tar.gz
5星 · 资源好评率100%
This issue occurs because the version of OpenSSL used to compile the 'ssl' module is not compatible with urllib3 v2.0, which requires OpenSSL 1.1.1 or higher. To resolve this problem, you can try the following solutions:
1. Upgrade OpenSSL: Depending on your operating system and package manager, try upgrading OpenSSL to version 1.1.1 or higher. For example, if you are using Linux, you can use package managers like apt, yum, or zypper to update OpenSSL.
2. Update Python: Try upgrading your Python version to the latest stable version that supports the required OpenSSL version.
3. Use an older version of urllib3: If you are unable to upgrade OpenSSL or Python versions, you can try using an older version of urllib3 that is compatible with your current 'ssl' module compile version. You can specify the version of urllib3 to install using the pip command, for example:
```
pip install urllib3==1.25.11
```
Please note that this may result in some feature limitations or potential security risks. Therefore, it is recommended to upgrade to a compatible version of OpenSSL and the latest stable Python version whenever possible.
If none of the above solutions work, it is advisable to consult the urllib3 documentation, GitHub issue tracker, or community support for further assistance and alternative solutions.
阅读全文