Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip 库版本是不是要调整一下 #525

Open
QAbot-zh opened this issue Jan 24, 2025 · 3 comments
Open

pip 库版本是不是要调整一下 #525

QAbot-zh opened this issue Jan 24, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@QAbot-zh
Copy link

问题描述

请对问题进行描述,并提供日志或截图
请确认 issues 中没有相同问题且完整阅读 wiki
本项目不处理网络环境引发的问题(例如 empty translation result/connection reset/check_hostname requires server_hostname/certificate verify failed/unable to connect to proxy/LocalEntryNotFoundError)

使用 pip 安装 pdf2zh,已遇到的库版本问题包括且不止如下:

ERROR: Could not find a version that satisfies the requirement azure-ai-translation-text<=1.0.1 (from pdf2zh) (from versions: 1.0.0b1)
ERROR: No matching distribution found for azure-ai-translation-text<=1.0.1 (from pdf2zh)
ERROR: Could not find a version that satisfies the requirement ollama (from pdf2zh) (from versions: none)
ERROR: No matching distribution found for ollama (from pdf2zh)

是不是应该检查升级一下,不要把版本限制的那么严格?使用的是 conda,python3.8,纯净 env 尚且 pip 失败

测试文档

Important

请提供用于复现测试的 PDF 文档

@QAbot-zh QAbot-zh added the bug Something isn't working label Jan 24, 2025
@awwaawwa
Copy link
Contributor

请使用python 3.10、3.11和3.12 。其余版本暂时不支持。

@QAbot-zh
Copy link
Author

请使用python 3.10、3.11和3.12 。其余版本暂时不支持。

python 3.12 依旧报错:

~ pip install pdf2zh

Collecting pdf2zh
  Downloading pdf2zh-1.7.9-py3-none-any.whl (159 kB)
     |████████████████████████████████| 159 kB 231 kB/s 
Collecting tenacity
  Downloading tenacity-8.2.3-py3-none-any.whl (24 kB)
Collecting gradio
  Downloading gradio-3.34.0-py3-none-any.whl (20.0 MB)
     |████████████████████████████████| 20.0 MB 1.8 MB/s 
Collecting torch
  Downloading torch-1.13.1-cp37-cp37m-manylinux1_x86_64.whl (887.5 MB)
     |████████████████████████████████| 887.5 MB 1.2 MB/s 
Collecting pymupdf
  Downloading PyMuPDF-1.22.5-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.1 MB)
     |████████████████████████████████| 14.1 MB 1.6 MB/s 
ERROR: Could not find a version that satisfies the requirement ollama (from pdf2zh) (from versions: none)
ERROR: No matching distribution found for ollama (from pdf2zh)

@awwaawwa
Copy link
Contributor

Downloading torch-1.13.1-cp37-cp37m-manylinux1_x86_64.whl (887.5 MB) 可知,您实际使用的是 python 3.7。

您可以尝试使用uv来安装pdf2zh。

uv tool install --python 3.12 pdf2zh
pdf2zh --version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants