解决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
相关推荐
Linux后台开发狮1 天前
DeepSeek-R1 技术剖析
人工智能·机器学习
时光轻浅,半夏挽歌1 天前
python不同格式文件的读写方式(json等)
python·json
测试人社区-千羽1 天前
边缘计算场景下的智能测试挑战
人工智能·python·安全·开源·智能合约·边缘计算·分布式账本
抽象带篮子1 天前
Pytorch Lightning 框架运行顺序
人工智能·pytorch·python
哇哈哈&1 天前
安装wxWidgets3.2.0(编译高版本erlang的时候用,不如用rpm包),而且还需要高版本的gcc++19以上,已基本舍弃
linux·数据库·python
luod1 天前
pymysql执行DDL语句
python
song5011 天前
鸿蒙 Flutter 图像识别进阶:物体分类与花卉识别(含离线模型)
人工智能·分布式·python·flutter·3d·华为·分类
Mqh1807621 天前
day 35 文件的拆分和使用
python
虚假程序设计1 天前
pythonnet 调用C接口
c语言·python
dhdjjsjs1 天前
Day32 PythonStudy
python