解决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
相关推荐
装不满的克莱因瓶19 分钟前
掌握 RNN 与 LSTM 模型结构
人工智能·python·rnn·深度学习·神经网络·ai·lstm
何以解忧,唯有..30 分钟前
Python包管理工具pip:从入门到精通
开发语言·python·pip
金銀銅鐵1 小时前
用 Tkinter 实现简单的猜数字游戏
后端·python
copyer_xyf1 小时前
Python 模块与包的导入导出
前端·后端·python
ice8130331811 小时前
【Python】Matplotlib折线图绘制
开发语言·python·matplotlib
copyer_xyf1 小时前
Python venv 虚拟环境
前端·后端·python
林爷万福2 小时前
GitHub 开源光谱数据处理项目推荐
python·光纤光谱仪
copyer_xyf3 小时前
Python 如何同时做很多事:进程、线程、协程
前端·后端·python
Full Stack Developme3 小时前
Spring Bean 依赖注入
python·spring·log4j
yuhuofei20213 小时前
【Python入门】Python中的元组tuple
python