解决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
相关推荐
cui_ruicheng28 分钟前
Python从入门到实战(十六):多进程编程
开发语言·python
_Jimmy_2 小时前
FastAPI + SQLAlchemy全局事务管理
python·fastapi
用户8356290780512 小时前
如何使用 Python 在 Excel 中添加、编辑和删除超链接
后端·python
ShallWeL4 小时前
【机器学习】(23)—— 神经网络入门
人工智能·神经网络·机器学习
AC赳赳老秦4 小时前
企业工商公开信息采集分析:OpenClaw 批量查询企业工商信息,生成企业画像报告
大数据·开发语言·python·自动化·php·deepseek·openclaw
FoldWinCard5 小时前
D6 Python 基础语法 --- 保留关键字
开发语言·python
暮暮祈安5 小时前
Celery 新手入门指南
java·数据库·python·flask·httpx
JustNow_Man5 小时前
每日高频场景英文口语
python
xiaowang1234shs5 小时前
怪兽轻断食技术深度测评:从断食计时引擎到AI识别算法的工程实践解析
数据库·人工智能·算法·macos·机器学习·p2p·visual studio