解决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
相关推荐
YXWik635 分钟前
图片 OCR 文字提取 (Python + AI 模型(ModelScope))
人工智能·python·ocr
Thecozzy1 小时前
写文档教 AI 用代码
开发语言·python
Hanniel1 小时前
装饰器 (中): 进阶篇,解锁框架级玩法
开发语言·python
康哥爱编程1 小时前
鸿蒙应用开发之应用如何实现腾讯云对象存储?
python·云计算·腾讯云
${王小剑}1 小时前
在pycharm中配置pyside6
ide·python·pycharm
烛之武1 小时前
Python速通笔记
windows·python
一个王同学2 小时前
从零到一 | CV转多模态大模型 | week12 | 整理 MiniLLaVA 工程与文档
人工智能·深度学习·算法·机器学习·计算机视觉
挨踢诗人2 小时前
旺店通ERP集成金蝶云星空解决方案
python·数据集成
码界索隆2 小时前
Python转Java系列:作者有话说
java·开发语言·python
未来智慧谷2 小时前
【无标题】
人工智能·python·大模型·ai幻觉