解决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
相关推荐
大草原的小灰灰11 小时前
Python基础语法
开发语言·python
小葱炖豆腐12 小时前
python绘制excel折线图
python·excel·numpy·pandas·matplotlib
猎头南楼13 小时前
大模型后训练与 Agent 自迭代:两类工程能力的观察
人工智能·深度学习·机器学习
Ticnix13 小时前
MCP 实战:把工具层从 Agent 里彻底解耦
python·mcp
XZ-07000114 小时前
week4-1-figure画布
python
步行cgn15 小时前
Spring 注入 Map 集合详解
数据库·python·spring
今儿敲了吗15 小时前
03停用词过滤
笔记·python
Zzj_tju15 小时前
VLM 读图评测:先审计评分器,再判断读错还是算错
人工智能·深度学习·机器学习·语言模型
李可以量化15 小时前
Tornado 部署公域网络安全与防护(上)
python
风跟我说过她16 小时前
SQL 一键转经典 Chen 风格 ER 图:开源 CLI + 在线工具 + Agent Skill
数据库·python·sql·开源·开源软件