解决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
相关推荐
weixin_433179331 分钟前
python - 读写文件
开发语言·python
Astro_ChaoXu11 分钟前
GAMSE使用日志与教程(高分辨率光谱数据缩减)
linux·数据库·python
人工智能培训15 分钟前
基于知识图谱的故障推理方法与算法
人工智能·python·深度学习·机器学习·知识图谱·故障诊断
ID_180079054731 小时前
超详细:Python 调用淘宝商品详情 API 完整教程
开发语言·python
逻辑君1 小时前
Research in Brain-inspired Computing [7]-带关节小人(3个)推箱的类意识报告
c++·人工智能·神经网络·机器学习
平常心cyk1 小时前
Python基础快速复习——函数的多种传参方式
python
lanboAI1 小时前
基于卷积神经网络的舌苔诊断系统,resnet50,alexnet, shufflenet模型【pytorch框架+python源码】
pytorch·python·cnn
QWsin1 小时前
【Pydantic】Pydantic 是什么?
python
WeeJot嵌入式1 小时前
爬虫对抗:ZLibrary反爬机制实战分析
爬虫·python·网络安全·playwright·反爬机制
Bert.Cai2 小时前
Python input函数作用
开发语言·python