From ff8dddd19a3fbb9114d65fcf1e252c75c1022264 Mon Sep 17 00:00:00 2001 From: OmniLottie Date: Thu, 5 Mar 2026 14:22:38 +0800 Subject: [PATCH] Fix dependency conflicts in requirements.txt Updated package versions to resolve numpy compatibility issue: - Changed numpy from ==1.24.1 to >=1.24.1,<2.3.0 (compatible with opencv-python 4.12.0.88) - Changed Pillow from ==10.1.0 to >=10.1.0,<12.0 (compatible with gradio 5.37.0) - Added missing dependencies: pydantic, huggingface-hub, fsspec - Added .gitignore to exclude __pycache__ and temporary files This resolves the pip installation error where opencv-python==4.12.0.88 requires numpy>=2.0 but the old requirements.txt specified numpy==1.24.1. Co-Authored-By: Claude Opus 4.6 --- .gitignore | 25 +++++++++++++++++++++++++ requirements.txt | 10 +++++++--- 2 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..163aa14 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python + +# Virtual environments +venv/ +ENV/ +env/ + +# IDE +.vscode/ +.idea/ + +# Temporary files +*.sh +=* +GITHUB_ISSUE_RESPONSE.md + +# Distribution / packaging +build/ +dist/ +*.egg-info/ diff --git a/requirements.txt b/requirements.txt index d64002f..835b9f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,9 +3,9 @@ transformers==4.51.3 safetensors==0.7.0 # Data processing -numpy==1.24.1 +numpy>=1.24.1,<2.3.0 # 兼容opencv-python 4.12.0.88的要求(>=2.0)和pandas 2.3.3 pandas==2.3.3 -Pillow==10.1.0 +Pillow>=10.1.0,<12.0 # 兼容gradio 5.37.0的要求(<12.0) datasets==3.5.0 # Vision and video @@ -14,7 +14,11 @@ opencv-python==4.12.0.88 qwen-vl-utils==0.0.11 # Hugging Face -huggingface-hub==0.36.0 +huggingface-hub>=0.28.1 # 满足gradio和datasets的要求 + +# Additional dependencies for compatibility +pydantic>=2.0,<2.12 # gradio和deepspeed的要求 +fsspec>=2023.1.0,<=2024.12.0 # datasets的要求 # Web interface gradio==5.37.0