解决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
相关推荐
珺毅同学2 小时前
YOLO生成预测json标签迁移问题
python·yolo·json
骑士雄师2 小时前
18.4 长期记忆可修改版
python
~小先生~2 小时前
Python从入门到放弃(一)
开发语言·python
天佑木枫3 小时前
第2天:变量与数据类型 —— 让程序记住信息
python
Dust-Chasing4 小时前
Claude Code源码剖析 - Claude Code 上下文压缩机制
人工智能·python·ai
2301_764441334 小时前
主流手机pc品牌的端侧模型部署梳理
人工智能·windows·机器学习·智能手机·产品运营
Cloud_Shy6185 小时前
解读《Effective Python 3rd Edition》:从练气到老魔(第五章 Item 33 - 35)
开发语言·人工智能·笔记·python·学习方法
abcy0712135 小时前
python pandas csv异步后台清洗前端优先返回成功信息
前端·python·pandas
硅谷秋水6 小时前
HumanEgo:基于人类第一人称视角数分钟视频的零样本机器人学习
人工智能·机器学习·计算机视觉·机器人