解决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
相关推荐
祉猷并茂,雯华若锦几秒前
Appium 3.x 实战:元素定位与常见错误解析
开发语言·python·appium
苏州邦恩精密20 分钟前
蔡司3D扫描仪厂家服务解析:制造企业如何实现精准检测
人工智能·机器学习·3d·自动化·制造
jiang_changsheng24 分钟前
Conda 的默认环境创建优先级。
linux·windows·python
FriendshipT35 分钟前
Ultralytics:解读C2fCIB模块
人工智能·pytorch·python·深度学习·目标检测
c_lb728842 分钟前
2026年AI量化学习流程,从表达开发走到分层验证
人工智能·python
s180579163621 小时前
低成本GEO优化技巧
人工智能·python
buhuizhiyuci2 小时前
【python篇——一周速通python语法】python的基础语法操作
开发语言·python
萧青山2 小时前
AI+HI人机协同范式:从ElementsClaw到政务智能体的分层进化论
人工智能·机器学习·政务·ai+hi人机协同
盼小辉丶2 小时前
OpenCV-Python实战——分析与加速OpenCV应用程序
python·神经网络·opencv·计算机视觉
buhuizhiyuci2 小时前
【python篇——一周速通python语法】python的条件语句和循环语句
开发语言·python