解决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
相关推荐
带多刺的玫瑰4 分钟前
Leecode#35刷题之搜索插入位置
java·python·算法
QQ14220784498 分钟前
IIS + wfastcgi 部署 Flask 应用实战:从连续 500 到稳定 200 的完整踩坑实录
python
WiKiLeaks_successor20 分钟前
Scipy库里的众数函数不严谨,我把它重构了。
python·scipy
傻啦嘿哟25 分钟前
房产数据对比爬虫:同时爬取链家+贝壳+安居客,做房价横向对比
python
小静AI工程实验室29 分钟前
JS 逆向接口 ID 变了?Python 与 Node.js 复现 JSON 大整数精度丢失
javascript·python·node.js
李航198332 分钟前
用 DeepDraw 几何引擎开发建筑设计软件(五):创建选择工具
python·3d
Metaphor69237 分钟前
使用 Python 设置 Excel 行列自适应 【代码示例】
python·excel
宁渡AI大模型3 小时前
河南宁渡科技有限公司|宁渡课堂 AI 全栈面试分享,RAG 项目面试深挖问题解析
人工智能·机器学习·rag
花酒锄作田9 小时前
FastAPI 使用 session 认证
python·fastapi
lsswear9 小时前
Python 并发 线程
开发语言·python