解决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
相关推荐
2501_942191778 小时前
基于YOLO11-HSFPN的数字检测与识别模型实现详解
python
忧郁的橙子.8 小时前
26期_01_Pyhton基本语法
python
sunfove9 小时前
实战篇:用 Python 徒手实现模拟退火算法解决 TSP 问题
开发语言·python·模拟退火算法
小饼干超人9 小时前
详解向量数据库中的PQ算法(Product Quantization)
人工智能·算法·机器学习
我是菜鸟0713号9 小时前
Qt + Python 算法集成的一种低耦合实践:FastAPI 服务化方案
python·qt·fastapi
我是一只小青蛙8889 小时前
TraeCNIDE Python开发全流程指南
python
欣然~10 小时前
法律案例 PDF 批量转 TXT 工具代码
linux·前端·python
少林码僧10 小时前
2.30 传统行业预测神器:为什么GBDT系列算法在企业中最受欢迎
开发语言·人工智能·算法·机器学习·ai·数据分析
季布,10 小时前
本地Windows测试:钉钉群消息/文件传输到Python服务(完整教程)
windows·python·钉钉
zm-v-1593043398610 小时前
最新AI-Python自然科学领域机器学习与深度学习技术
人工智能·python·机器学习