解决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面向对象编程:解耦、多态与魔法艺术
java·开发语言·c++·python·设计模式·软件工程
AI云原生6 分钟前
如何解决 pip install 代理报错 SOCKS5 握手失败 ReadTimeoutError 问题
网络·爬虫·python·网络协议·tcp/ip·scikit-learn·pip
cnxy1888 小时前
围棋对弈Python程序开发完整指南:步骤4 - 提子逻辑和劫争规则实现
开发语言·python·机器学习
TheSumSt9 小时前
Python丨课程笔记Part3:语法进阶部分(控制结构与基础数据结构)
数据结构·笔记·python
ha_lydms9 小时前
5、Spark函数_s/t
java·大数据·python·spark·数据处理·maxcompute·spark 函数
电商API&Tina10 小时前
跨境电商 API 对接指南:亚马逊 + 速卖通接口调用全流程
大数据·服务器·数据库·python·算法·json·图搜索算法
Yyyyy123jsjs10 小时前
外汇Tick数据交易时段详解与Python实战分析
人工智能·python·区块链
默默前行的虫虫10 小时前
nicegui地图总结
网络·python
不易思不逸11 小时前
SAM2 测试
人工智能·python
BOF_dcb11 小时前
【无标题】
pytorch·深度学习·机器学习