解决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
相关推荐
AI开发发烧友7 小时前
LangGraph多Agent协作实战:以物流售前场景为例的5 Agent工作流设计
python
码云骑士8 小时前
70-多Agent协作-CrewAI-AutoGen-角色分工与信息传递协议
python
mftang8 小时前
TensorFlow Lite Micro:面向TinyML系统的嵌入式机器学习推理框架
人工智能·机器学习·tensorflow
Hachi被抢先注册了8 小时前
Skills总结
python
用户0332126663678 小时前
使用 Python 在 PowerPoint 中创建折线图和条形图
python
benchmark_cc8 小时前
如何用 Python 进行多周期 K 线合成与时区对齐?基于 QuantDash 与 Pandas 的量化数据清洗实战(附 GitHub 源码)
开发语言·python·github·盯盘·pandas·quantdash·量化数据
不如语冰8 小时前
AI大模型入门-参数的传递
数据结构·人工智能·pytorch·python
用户6760840656178 小时前
GraphBLAS_01_图的稀疏表示
python
小陈工8 小时前
第7篇:Django框架核心原理与实战深度解析(下)
后端·python·面试
是上好佳佳佳呀9 小时前
【机器学习|DAY02】数据划分与特征工程
人工智能·机器学习