解决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
相关推荐
猎嘤一号15 分钟前
【2026 最新】Windows 11 右键菜单还原为 Windows 10 经典样式:一条命令、原理、回退与新版说明
windows·python
用户83562907805134 分钟前
使用 Python 在 Word 文档中创建自定义图表
后端·python
让学习成为一种生活方式37 分钟前
EviAnn v2.0.5 安装与使用--生信工具111
机器学习
haluhalu.1 小时前
机器学习概念
人工智能·机器学习
kyrie_sakura2 小时前
python学习笔记11 -- 进程和线程
笔记·python·学习
Jialu.2 小时前
中文 NLP 模型部署实战:FastAPI 接口 + Streamlit 看板
人工智能·python·自然语言处理·fastapi
月华路3 小时前
《模型不玄学》小白的模型算法实战手册 - 前言
人工智能·机器学习
Asum1ta3 小时前
K8s 学习环境搭建:Python 与 PyCharm 开发环境配置指南
python·学习·kubernetes
知识汲取者3 小时前
FastAPI 学习教程(写给想学 FastAPI 的 Java 工程师的)
python·学习·fastapi