解决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
相关推荐
骑士雄师19 小时前
Python (PyMySQL) vs Java (JDBC) 数据库操作对比
开发语言·python
weixin1997010801619 小时前
[特殊字符] 从1688接口设计,学习高可用API的最佳实践(附Python源码)
python·学习·spring
隔壁大炮19 小时前
MNE-Python 第8天学习笔记:时频分析(ERD/ERS)
python·eeg·mne·脑电数据处理
小许同学记录成长20 小时前
gr-analog 模拟信号模块完整源码分析
python·算法·信号处理
MediaTea20 小时前
PyTorch:主要模块简介
人工智能·pytorch·python·深度学习·机器学习
技术小猪猪20 小时前
PromptOps:用Python构建生产级提示词工程体系
人工智能·python·ai·自动化·prompt
ZHW_AI课题组20 小时前
基于MLP神经网络的红酒品质回归预测
人工智能·神经网络·机器学习·回归
人工智能培训20 小时前
探析数字孪生的核心特性与应用价值
人工智能·深度学习·神经网络·机器学习·生成对抗网络
工业互联网专业20 小时前
国潮男装微博评论数据分析系统的设计与实现 _flask+spider
python·flask·毕业设计·源码·课程设计·spider
BUG研究员_20 小时前
python之数据分析-pandas部分
python·信息可视化·数据分析