解决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
相关推荐
Yunzenn3 分钟前
深度解析字节前沿研究-Cola DLM第 04 章:Cola DLM 架构全景 —— 三层解耦的设计哲学
java·linux·python·深度学习·面试·github·transformer
秣厉科技15 分钟前
【番外】04:Python 和 LabVIEW 对接 DeepSeek API
python·labview·deepseek
小新同学^O^17 分钟前
简单学习 --> 限流和熔断
数据库·python·学习
kyraaa118 分钟前
618智能灭蚊器什么牌子好?电灭蚊灯哪个牌子好用?综合测评希亦、绳池等10大热门灭蚊灯品牌!
大数据·人工智能·python
deephub19 分钟前
推理 → 行动 → 观察:用 LangChain + Python 实现一个智能体循环
人工智能·python·langchain·大语言模型·agent
码界筑梦坊25 分钟前
143-基于Python的景点热度分析数据可视化分析系统
python·信息可视化·数据分析·毕业设计·fastapi
独隅27 分钟前
PyTorch转TFLite动态形状量化指南
人工智能·pytorch·python
隔壁大炮30 分钟前
MNE-Python 第3天学习笔记:事件与标记处理
python·eeg·mne·脑电数据处理
隔壁大炮34 分钟前
MNE-Python 第5天学习笔记:数据预处理(二)—— 伪迹处理
python·eeg·mne·脑电数据处理
夕除34 分钟前
spring boot 12
java·开发语言·python