解决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
相关推荐
Marst Code28 分钟前
上位机开发日记 · 第 2 篇 · 架构先行:六层分层与边界
python
李日华大战鸡红1 小时前
FOC状态空间方程模型推导(学习记录)
python·学习·线性代数
小蒋观天下2 小时前
专项方案:大场景港口AI安防、多干扰环境下的算法调优与落地实操
人工智能·深度学习·算法·安全·机器学习·计算机视觉·ai大模型
外收内放3 小时前
Python基础语法练习题(57-58)
开发语言·python
wuyk5554 小时前
ROS2 Humble 从入门实战教程:第六章:节点:机器人的工作细胞
机器学习
朝朝辞暮i4 小时前
VLA 系统学习第 3 课:从一次机器人示范,到真正送进神经网络的 Batch
人工智能·python·深度学习·神经网络·vla
小鹿的周先生4 小时前
第11章-Structured-Output
开发语言·人工智能·python
梦在远山后4 小时前
通过 WSS 让 Server 安全调用 Desktop 本地工具(下01):Ticket、人工确认、幂等与断线对账
python·langchain·agent
泡海椒5 小时前
JQuick-Excel 实战:FORMAT 管理日期与数字的 Excel 显示
开发语言·python·excel
学掌门6 小时前
老司机带你十分钟入门Python!
开发语言·python