解决cryptography库报错【DLL load failed while importing _rust】

解决 DLL load failed while importing _rust

python使用库cryptography

当 from cryptography.hazmat.bindings._rust import exceptions as rust_exceptions 时,会报错:

ImportError: DLL load failed while importing _rust: 找不到指定的程序。

问题分析

可能是cryptography的版本不对导致的,本人安装的是42.0.5的版本,查看版本的方法如下

python 复制代码
import cryptography
print(cryptography.__version__)

解决办法

安装低版本的 cryptography

shell 复制代码
pip install cryptography==41.0.2
相关推荐
信创天地1 天前
RISC-V 2025年在国内的发展趋势
python·网络安全·系统架构·系统安全·运维开发
Danceful_YJ1 天前
30.注意力汇聚:Nadaraya-Watson 核回归
pytorch·python·深度学习
FreeCode1 天前
LangChain1.0智能体开发:人机协作
python·langchain·agent
2501_930412271 天前
如何添加清华源到Conda?
开发语言·python·conda
2501_930412271 天前
如何删除Conda中的清华源配置?
开发语言·python·conda
程序猿20231 天前
Python每日一练---第十二天:验证回文串
开发语言·python
沿着路走到底1 天前
python 判断与循环
java·前端·python
大千AI助手1 天前
参考先验(Reference Priors)详解:理论与Python实践
人工智能·机器学习·贝叶斯·大千ai助手·参考先验·贝叶斯推断·先验
jz_ddk1 天前
[数学基础] 瑞利分布:数学原理、物理意义及Python实验
开发语言·python·数学·概率论·信号分析
陈辛chenxin1 天前
【大数据技术06】大数据技术
大数据·hadoop·分布式·python·信息可视化