我在一台Windows 10电脑上安装了Python 2.7.17。接下来,我想通过在Python中运行以下命令来测试其OpenSSL版本:
import ssl
print ssl.OPENSSL_VERSION_INFO
我正在获得(1, 0, 2, 20, 15)
。
我想要升级到版本1.1.1。
运行pip freeze命令后,我得到了如下结果:
cffi==1.14.0
cryptography==2.8
enum34==1.1.6
ipaddress==1.0.23
pycparser==2.19
pyOpenSSL==19.1.0
six==1.14.0
这些似乎是pyOpenSSL和cryptography中最新的pip版本。
我安装的openssl(作为git bash的一部分)是1.1.1,但这并不是Python内部使用的相同版本。
我如何将Python中包含的openssl版本升级到1.1.1或更高版本?
编辑: 响应评论,以下是python -m OpenSSL.debug的结果:
C:\Users\assaf>python -m OpenSSL.debug
pyOpenSSL: 19.1.0
cryptography: 2.8
cffi: 1.14.0
cryptography's compiled against OpenSSL: OpenSSL 1.1.1d 10 Sep 2019
cryptography's linked OpenSSL: OpenSSL 1.1.1d 10 Sep 2019
Pythons's OpenSSL: OpenSSL 1.0.2t 10 Sep 2019
Python executable: C:\Python27\python.exe
Python version: 2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 21:01:17) [MSC v.1500 64 bit (AMD64)]
Platform: win32
sys.path: ['', 'C:\\WINDOWS\\SYSTEM32\\python27.zip', 'C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages']
如上所述,密码学和pyOpenSSL是pip中最新的。
py -m OpenSSL.debug
的输出是什么?你尝试更新了列出的每个模块了吗? - Arn