解决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
相关推荐
千里码aicood4 小时前
flask基于数字人的储粮知识问答原型系统研究与实现
后端·python·flask
E_ICEBLUE4 小时前
Python 实现 Markdown 转 Word、PDF:从转换到页面设置
python·pdf·word·markdown·格式转换
哒咩哒咩1295 小时前
Agent 智能体开发全攻略:从 ReAct 到企业级架构
python·langchain·fastapi
今天AI了吗5 小时前
AI工作流的自动化趋势:从手动实验到自主Agent的研究范式转变
运维·数据库·人工智能·sql·机器学习·自动化·github
H愚公移山H5 小时前
Tengine2.4.1 + OpenSSL1.1.1w 全平台编译踩坑手册(CentOS7 x86_64|Linux x64|ARM64|2026实战复盘)
python
码云骑士5 小时前
120-视频理解-大模型视频分析-抽帧-自动字幕摘要-高光片段
python·音视频
xfan_me5 小时前
手机在网状态接口-空号查询-空号过滤API
数据库·人工智能·python·智能手机
测试秃头怪5 小时前
Postman中变量的使用
自动化测试·软件测试·python·测试工具·测试用例·接口测试·postman
ynchyong5 小时前
词云(Word Cloud) 使用方法
python·统计·词云
知识分享小能手5 小时前
概理论与数理统计学习教程,从入门到精通,马尔可夫链(25)
学习·机器学习·概率论