解决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
相关推荐
Full Stack Developme1 小时前
Spring Security 与 Apache Shiro 两大安全框架比较
spring boot·python·安全
杰瑞哥哥1 小时前
快速搭建Web前端(streamlit使用指南)
python·信息可视化·web·模型部署
小途软件1 小时前
基于计算机视觉的课堂行为编码研究
人工智能·python·深度学习·计算机视觉·语言模型·自然语言处理·django
智航GIS1 小时前
9.2 多进程入门
数据库·python
小途软件1 小时前
基于计算机视觉的桥梁索力测试方法
人工智能·python·语言模型·自然语言处理·django
咚咚王者1 小时前
人工智能之核心基础 机器学习 第七章 监督学习总结
人工智能·学习·机器学习
yousuotu2 小时前
基于Python实现水果新鲜度分类
开发语言·python·分类
Data_agent2 小时前
微店商品列表API接口指南
大数据·数据库·python
吴老弟i2 小时前
基于 VSCode 实现 Python 开发与调试 | 环境配置搭建 | PIP Anaconda
vscode·python·pip
武子康2 小时前
大数据-203 scikit-learn 决策树剪枝参数:max_depth/min_samples_leaf 到 min_impurity_decrease
大数据·后端·机器学习