解决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
相关推荐
jufeng13073 小时前
【系列:手搓自主 AI Agent:Hermes 架构原理剖析 · 第 11 篇】
python·ai agent·mcp
En^_^Joy3 小时前
Django项目配置全攻略:settings配置文件
后端·python·django
killerbasd4 小时前
总结 8。15
人工智能·机器学习·概率论
for_ever_love__4 小时前
python基础语法学习: 异常的传递性
开发语言·python·学习
AC赳赳老秦4 小时前
公开图片 OCR 数据提取:OpenClaw 合规采集公开信息图,识别文字与表格并转化为结构化数据
java·大数据·前端·数据库·python·php·openclaw
麻雀飞吧5 小时前
零基础选量化工具,先把问题说清楚
人工智能·python
段一凡-华北理工大学6 小时前
AI推动工业智能化转型~系列文章20:工业 AI 平台架构:云-边-端协同的技术体系
人工智能·python·架构·工业平台·云-边协同
CodeBlog-star6 小时前
Harness Engineering:Pi Agent 架构深度解析
人工智能·python·架构·harness工程
简不变6 小时前
将components下的文件夹复制到别一个文件夹下,并重新生成CMakelist.txt文件
python