FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead.
Closed this issue · 1 comments
🔎 Search before asking | 提交之前请先搜索
- I have searched the MinerU Readme and found no similar bug report.
- I have searched the MinerU Issues and found no similar bug report.
- I have searched the MinerU Discussions and found no similar bug report.
🤖 Consult the online AI assistant for assistance | 在线 AI 助手咨询
- I have consulted the online AI assistant but was unable to obtain a solution to the issue.
Description of the bug | 错误描述
启动mineru解析时显示如下错误,
问题的根源在代码内部:这个 FutureWarning (未来警告) 是由 mineru 所依赖的 PyTorch 库的内部代码生成的。可以理解为,当前版本的 PyTorch 代码里写着类似这样的逻辑:“我准备使用 pynvml 这个功能了,但请注意,它快要被淘汰了,未来我们会换成 nvidia-ml-py。”
mineru 工具的开发者:他们需要更新自己项目的依赖项,让 mineru 去使用那个不再产生警告的、更新版本的 PyTorch。
(mineru) [wenxy@DESKTOP-DABEL8H ~]$ mineru -p ./control_1.pdf -o ./control_1
/home/wenxy/miniconda3/envs/mineru/lib/python3.10/site-packages/torch/cuda/init.py:63: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.
import pynvml # type: ignore[import]
2025-09-21 20:44:50.820 | INFO | mineru.backend.pipeline.pipeline_analyze:doc_analyze:125 - Batch 1/1: 176 pages/176 pages
2025-09-21 20:44:50.823 | INFO | mineru.backend.pipeline.pipeline_analyze:
How to reproduce the bug | 如何复现
pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple
pip install uv -i https://mirrors.aliyun.com/pypi/simple
uv pip install -U "mineru[core]" -i https://mirrors.aliyun.com/pypi/simple
Operating System Mode | 操作系统类型
No response
Operating System Version| 操作系统版本
pip install --upgrade pip -i https://mirrors.aliyun.com/pypi/simple
pip install uv -i https://mirrors.aliyun.com/pypi/simple
uv pip install -U "mineru[core]" -i https://mirrors.aliyun.com/pypi/simple
Python version | Python 版本
3.10
Software version | 软件版本 (mineru --version)
2.0.x
Device mode | 设备模式
cuda
我们没有引入pynvml 这个包,可能是pytorch引入的,我们目前查看2.7.1和2.8.0都没有引入,您可以更新到最新版的pytorch