本文主要是介绍成功解决RuntimeError: OpenSSL 3.0‘s legacy provider failed to load,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
报错
RuntimeError: OpenSSL 3.0's legacy provider failed to load. This is a fatal error by default, but cryptography supports running without legacy algorithms by setting the environment variable CRYPTOGRAPHY_OPENSSL_NO_LEGACY. If you did not expect this error, you have likely made a mistake with your OpenSSL configuration.
解决办法
OpenSSL 3.0加载失败: 此错误表明 cryptography 库试图加载OpenSSL 3.0的遗留提供程序,但失败了。错误建议通过设置环境变量 CRYPTOGRAPHY_OPENSSL_NO_LEGACY 来禁用遗留算法。如果你不需要使用遗留算法,可以通过以下方式在运行脚本之前设置环境变量:
export CRYPTOGRAPHY_OPENSSL_NO_LEGACY=1
或者,如果你确实需要遗留算法,这可能表明你的OpenSSL配置有误。
这篇关于成功解决RuntimeError: OpenSSL 3.0‘s legacy provider failed to load的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!