解决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
相关推荐
m0_6245785910 分钟前
MySQL主从复制支持跨版本吗_不同版本间同步的注意事项
jvm·数据库·python
Black蜡笔小新13 分钟前
企业级私有化AI模型训练工作站DLTM一体化AI模型训练工作站重构企业AI自主可控新模式
机器学习·ai大模型
yuanpan33 分钟前
Python Pygame 入门教程:从零学会创建窗口、绘图和游戏交互
python·游戏·pygame
2401_8714928543 分钟前
如何在 React Router v6 中正确配置多路由组件显示
jvm·数据库·python
神仙别闹2 小时前
基于Python(Django)+MySQL 实现(Web)SQL智能检测系统的设计与实现
python·mysql·django
甄心爱学习2 小时前
【项目实训】法律文书智能摘要系统4
python·github·个人开发
huzhongqiang2 小时前
Playwright理解与封装
python
zhangchaoxies2 小时前
MySQL触发器能否监控特定用户操作_结合审计功能实现分析
jvm·数据库·python
qq_413502022 小时前
如何解决ORA-12518监听程序无法分配进程_内存耗尽与PGA溢出
jvm·数据库·python
zhangrelay3 小时前
三分钟云课实践速通--大学物理--python 版
linux·开发语言·python·学习·ubuntu·lubuntu