解决module ‘lib’ has no attribute ‘OpenSSL_add_all_algorithms’错误的方法

module ‘lib’ has no attribute 'OpenSSL_add_all_algorithms’出现这个问题是因为你说安装的 cryptography库与你现在的使用的环境不兼容导致的,可能是因为cryptography的版本太高,需要进行降级

pip install cryptography==38.0.4

如果无法安装看看代理是否是开着的,或者是pip版本的问题。如果是pip版本的问题就需要升级一下

python -m pip install -U --force-reinstall pip

执行完之后在执行上边的代码试试,多试几次就好了。如果实在是装不上去,那就先把之前cryptography库卸载了之后,再装

pip uninstall cryptography

物联沃分享整理
物联沃-IOTWORD物联网 » 解决module ‘lib’ has no attribute ‘OpenSSL_add_all_algorithms’错误的方法

发表评论