MinerU-master/projects/web_api工程报错:ERROR: Could not find a version that satisfies the requirement detectron2 (from versions: none) ERROR: No matching distribution found for detectron2 #1158
File "/opt/mineru_venv/lib/python3.10/site-packages/magic_pdf/model/pdf_extract_kit.py", line 4, in
import cv2
ModuleNotFoundError: No module named 'cv2'
6、修改dockerfile文件
pip install magic-pdf[full-cpu] detectron2 --extra-index-url https://myhloli.github.io/wheels/ --no-cache-dir"
7、执行docker build -t mineru/arm:0.1 --platform=linux/arm64 .
报错:Successfully installed pip-24.3.1
Looking in indexes: https://mirrors.aliyun.com/pypi/simple, https://myhloli.github.io/wheels/
ERROR: Could not find a version that satisfies the requirement detectron2 (from versions: none)
ERROR: No matching distribution found for detectron2
The command '/bin/sh -c /bin/bash -c "source /opt/mineru_venv/bin/activate
8、在https://myhloli.github.io/wheels/ 只发现了这些文件
而我的macos系统版本是12.0
9、我的dockerfile在原来基础上修改两处
Description of the bug | 错误描述
ERROR: Could not find a version that satisfies the requirement detectron2 (from versions: none) ERROR: No matching distribution found for detectron2
How to reproduce the bug | 如何复现
本地已经安装完成MinerU,并能成功执行下面文件 https://github.com/opendatalab/MinerU/blob/master/demo/magic_pdf_parse_main.py 拷贝两个文件: 1、在/Users/xialihui目录;把.paddleocr拷贝到/Documents/myocr/MinerU-master/projects/web_api 2、/Users/xialihui/.cache/huggingface/hub/models--opendatalab--PDF-Extract-Kit-1.0/snapshots/38e484355b9acf5654030286bf72490e27842a3c/models 拷贝到工程目录 目的是基于web_api打个arm镜像 3、在目录https://github.com/opendatalab/MinerU/tree/master/projects/web_api 并修改dockerfile 使用cpu python -m pip install paddlepaddle==3.0.0b1 -i https://www.paddlepaddle.org.cn/packages/stable/cpu 4、执行docker build -t mineru/arm:0.1 --platform=linux/arm64 . 成功打出镜像,然后执行docker run -itd --name=mineru_server -p 8888:8000 mineru:0.1 5、上传pdf文件,执行报错 2024-12-01 08:30:20.031 | ERROR | magic_pdf.model.pdf_extract_kit::24 - Required dependency not installed, please install by
"pip install magic-pdf[full-cpu] detectron2 --extra-index-url https://myhloli.github.io/wheels/"
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "/opt/mineru_venv/lib/python3.10/site-packages/magic_pdf/model/pdf_extract_kit.py", line 4, in
ModuleNotFoundError: No module named 'cv2' 6、修改dockerfile文件 pip install magic-pdf[full-cpu] detectron2 --extra-index-url https://myhloli.github.io/wheels/ --no-cache-dir" 7、执行docker build -t mineru/arm:0.1 --platform=linux/arm64 . 报错:Successfully installed pip-24.3.1 Looking in indexes: https://mirrors.aliyun.com/pypi/simple, https://myhloli.github.io/wheels/ ERROR: Could not find a version that satisfies the requirement detectron2 (from versions: none) ERROR: No matching distribution found for detectron2 The command '/bin/sh -c /bin/bash -c "source /opt/mineru_venv/bin/activate 8、在https://myhloli.github.io/wheels/ 只发现了这些文件 而我的macos系统版本是12.0 9、我的dockerfile在原来基础上修改两处
10、
Operating system | 操作系统
MacOS
Python version | Python 版本
3.10
Software version | 软件版本 (magic-pdf --version)
0.10.x
Device mode | 设备模式
cpu