解决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
相关推荐
小羊没烦恼!13 分钟前
.NET 11 Runtime Async 详解
java·运维·开发语言·javascript·python
染指111040 分钟前
152.Agent-LangGraph-Command的参数
人工智能·python·langchain·agents
第404号工位1 小时前
“已彻底删除”的照片与文件到底去哪了?我用底层扇区扫描,扒出手机和电脑的幽灵数据
linux·python·架构
智购科技自动售卖机厂家1 小时前
双摄像头方案F1-score只有0.85,排查发现是上下视角的融合逻辑写反了~YH
python·单片机·嵌入式硬件·算法·eclipse
田里的水稻1 小时前
FA_CNN卷积神经网络二---PyTorch
人工智能·pytorch·python·深度学习·cnn
小肝一下1 小时前
1.大模型介绍
python·langchain·大模型·ollama·langgrap
xiangjiaodalishi1 小时前
从 0 到 1 搭建 AI 友好的网站结构:信息架构与 GEO 的交叉地带
人工智能·python
凯瑟琳.奥古斯特1 小时前
OCR文字检测算法对比解析
开发语言·python·职场和发展
Misnice2 小时前
Python 内置函数大全
开发语言·windows·python
沉下心来学鲁班2 小时前
具身智能进阶:让 MicroDuck 踩着高跷走路
人工智能·python·机器人