解决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
相关推荐
梨落秋霜2 小时前
Python入门篇【文件处理】
android·java·python
Java 码农2 小时前
RabbitMQ集群部署方案及配置指南03
java·python·rabbitmq
Learn Beyond Limits2 小时前
解构语义:从词向量到神经分类|Decoding Semantics: Word Vectors and Neural Classification
人工智能·算法·机器学习·ai·分类·数据挖掘·nlp
张登杰踩4 小时前
VIA标注格式转Labelme标注格式
python
Learner4 小时前
Python数据类型(四):字典
python
odoo中国5 小时前
Odoo 19 模块结构概述
开发语言·python·module·odoo·核心组件·py文件按
Jelena157795857925 小时前
Java爬虫api接口测试
python
踩坑记录6 小时前
leetcode hot100 3.无重复字符的最长子串 medium 滑动窗口(双指针)
python·leetcode
过期的秋刀鱼!6 小时前
机器学习-逻辑回归的成本函数的补充-推导
人工智能·机器学习·逻辑回归