解决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
相关推荐
qq_1588954111111 小时前
AI 音乐生成完成后,音频 URL 为什么会过期?一套可恢复的交付方案
python·api·ai音乐
2601_9679801113 小时前
Hugging Face:成为机器学习界的“Github”
机器学习·hugging face·开源平台·开放科学·transformer模型
Warson_L13 小时前
高性能架构设计
python·go
小白菜0013 小时前
AI的理解
人工智能·机器学习
databook14 小时前
新数据到手,先跑哪几步检查
python·数据分析
DFT计算杂谈14 小时前
可DIY布里渊区图像绘制编辑器
人工智能·机器学习·语言模型·矩阵·编辑器
czq_268671948714 小时前
Python打卡第46天
开发语言·python
Flynt15 小时前
日涨4000星的OSINT工具,我拿Linus的用户名和一个随机字符串实测了一遍
python·安全
曲径海盗18 小时前
【Python 学习第 53 天】列表基础
python·学习笔记·编程入门