make all: torch depends on typing-extensions?
Closed this issue · 5 comments
ERROR: Cannot install -r /dev/fd/63 (line 1) because these package versions have conflicting dependencies.
The conflict is caused by:
torch 1.13.1+cpu depends on typing-extensions
torch 1.13.0+cpu depends on typing-extensions
torch 1.12.1+cpu depends on typing-extensions
torch 1.12.0+cpu depends on typing-extensions
torch 1.11.0+cpu depends on typing-extensions
To fix this you could try to:
- loosen the range of package versions you've specified
- remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
any ideas? I'm using Python 3.10.7
Could you please show more context? This does not even cover which module is failing.
. /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/bin/activate && make -C ocrd_detectron2 deps
make[2]: Verzeichnis „/home/georg/Projekte/OCR/ocrd_all/ocrd_detectron2“ wird betreten
Requirement already satisfied: ocrd>=2.40 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from -r /dev/fd/63 (line 1)) (2.45.1)
Requirement already satisfied: click>=7.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from -r /dev/fd/63 (line 2)) (8.1.3)
Requirement already satisfied: scipy in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from -r /dev/fd/63 (line 3)) (1.10.1)
Requirement already satisfied: numpy>=1.17.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from -r /dev/fd/63 (line 4)) (1.24.2)
Requirement already satisfied: pillow>=7.1.2 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from -r /dev/fd/63 (line 5)) (9.4.0)
Requirement already satisfied: shapely in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from -r /dev/fd/63 (line 6)) (2.0.1)
Requirement already satisfied: scikit-image>=0.17.2 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from -r /dev/fd/63 (line 7)) (0.20.0)
Requirement already satisfied: ocrd-modelfactory==2.45.1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.45.1)
Requirement already satisfied: sparklines>=0.4.2 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (0.4.2)
Requirement already satisfied: ocrd-utils==2.45.1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.45.1)
Requirement already satisfied: Flask in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.2.3)
Requirement already satisfied: bagit-profile>=1.3.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (1.3.1)
Requirement already satisfied: opencv-python-headless in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (4.7.0.72)
Requirement already satisfied: pyyaml in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (6.0)
Requirement already satisfied: python-magic in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (0.4.27)
Requirement already satisfied: requests in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.28.2)
Requirement already satisfied: ocrd-validators==2.45.1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.45.1)
Requirement already satisfied: lxml in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (4.9.2)
Requirement already satisfied: bagit>=1.7.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (1.8.1)
Requirement already satisfied: Deprecated==1.2.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (1.2.0)
Requirement already satisfied: jsonschema in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (4.17.3)
Requirement already satisfied: memory-profiler>=0.58.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (0.61.0)
Requirement already satisfied: ocrd-models==2.45.1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.45.1)
Requirement already satisfied: wrapt<2,>=1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from Deprecated==1.2.0->ocrd>=2.40->-r /dev/fd/63 (line 1)) (1.15.0)
Requirement already satisfied: atomicwrites>=1.3.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from ocrd-utils==2.45.1->ocrd>=2.40->-r /dev/fd/63 (line 1)) (1.4.1)
Requirement already satisfied: lazy_loader>=0.1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from scikit-image>=0.17.2->-r /dev/fd/63 (line 7)) (0.1)
Requirement already satisfied: tifffile>=2019.7.26 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from scikit-image>=0.17.2->-r /dev/fd/63 (line 7)) (2023.2.28)
Requirement already satisfied: networkx>=2.8 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from scikit-image>=0.17.2->-r /dev/fd/63 (line 7)) (3.0)
Requirement already satisfied: packaging>=20.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from scikit-image>=0.17.2->-r /dev/fd/63 (line 7)) (23.0)
Requirement already satisfied: imageio>=2.4.1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from scikit-image>=0.17.2->-r /dev/fd/63 (line 7)) (2.26.0)
Requirement already satisfied: PyWavelets>=1.1.1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from scikit-image>=0.17.2->-r /dev/fd/63 (line 7)) (1.4.1)
Requirement already satisfied: psutil in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from memory-profiler>=0.58.0->ocrd>=2.40->-r /dev/fd/63 (line 1)) (5.9.4)
Requirement already satisfied: future in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from sparklines>=0.4.2->ocrd>=2.40->-r /dev/fd/63 (line 1)) (0.18.3)
Requirement already satisfied: Werkzeug>=2.2.2 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from Flask->ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.2.3)
Requirement already satisfied: itsdangerous>=2.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from Flask->ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.1.2)
Requirement already satisfied: Jinja2>=3.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from Flask->ocrd>=2.40->-r /dev/fd/63 (line 1)) (3.1.2)
Requirement already satisfied: pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from jsonschema->ocrd>=2.40->-r /dev/fd/63 (line 1)) (0.19.3)
Requirement already satisfied: attrs>=17.4.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from jsonschema->ocrd>=2.40->-r /dev/fd/63 (line 1)) (22.2.0)
Requirement already satisfied: certifi>=2017.4.17 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from requests->ocrd>=2.40->-r /dev/fd/63 (line 1)) (2022.12.7)
Requirement already satisfied: idna<4,>=2.5 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from requests->ocrd>=2.40->-r /dev/fd/63 (line 1)) (3.4)
Requirement already satisfied: charset-normalizer<4,>=2 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from requests->ocrd>=2.40->-r /dev/fd/63 (line 1)) (3.1.0)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from requests->ocrd>=2.40->-r /dev/fd/63 (line 1)) (1.26.14)
Requirement already satisfied: MarkupSafe>=2.0 in /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/lib/python3.10/site-packages (from Jinja2>=3.0->Flask->ocrd>=2.40->-r /dev/fd/63 (line 1)) (2.1.2)
Cannot find CUDA runtime library, assuming CPU-only
Detected CUDA version: CPU
Looking in indexes: https://download.pytorch.org/whl/cpu
Collecting torch>=1.10.0
Using cached https://download.pytorch.org/whl/cpu/torch-1.13.1%2Bcpu-cp310-cp310-linux_x86_64.whl (199.1 MB)
Collecting torchvision>=0.11.2
Using cached https://download.pytorch.org/whl/cpu/torchvision-0.14.1%2Bcpu-cp310-cp310-linux_x86_64.whl (16.8 MB)
Collecting torch>=1.10.0
Using cached https://download.pytorch.org/whl/cpu/torch-1.13.0%2Bcpu-cp310-cp310-linux_x86_64.whl (198.5 MB)
Using cached https://download.pytorch.org/whl/cpu/torch-1.12.1%2Bcpu-cp310-cp310-linux_x86_64.whl (189.2 MB)
Using cached https://download.pytorch.org/whl/cpu/torch-1.12.0%2Bcpu-cp310-cp310-linux_x86_64.whl (189.0 MB)
Using cached https://download.pytorch.org/whl/cpu/torch-1.11.0%2Bcpu-cp310-cp310-linux_x86_64.whl (169.2 MB)
ERROR: Cannot install -r /dev/fd/63 (line 1) because these package versions have conflicting dependencies.
The conflict is caused by:
torch 1.13.1+cpu depends on typing-extensions
torch 1.13.0+cpu depends on typing-extensions
torch 1.12.1+cpu depends on typing-extensions
torch 1.12.0+cpu depends on typing-extensions
torch 1.11.0+cpu depends on typing-extensions
To fix this you could try to:
- loosen the range of package versions you've specified
- remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
make[2]: *** [Makefile:37: deps] Fehler 1
make[2]: Verzeichnis „/home/georg/Projekte/OCR/ocrd_all/ocrd_detectron2“ wird verlassen
make[1]: *** [Makefile:284: /home/georg/Projekte/OCR/ocrd_all/venv/sub-venv/headless-tf1/bin/ocrd-detectron2-segment] Fehler 2
make[1]: Verzeichnis „/home/georg/Projekte/OCR/ocrd_all“ wird verlassen
make: *** [Makefile:279: /home/georg/Projekte/OCR/ocrd_all/venv/bin/ocrd-detectron2-segment] Fehler 2
make: *** Datei „/home/georg/Projekte/OCR/ocrd_all/venv/bin/ocrd-detectron2-segment“ wird gelöscht
does this help?
Yes, I can reproduce – thanks!
@gpetz I pushed a fix to https://github.com/bertsky/ocrd_detectron2 master. You can update your ocrd_all installation like this:
cd Projekte/OCR/ocrd_all
cd ocrd_detectron2
git checkout master && git pull origin master
cd -
make NO_UPDATE=1 ocrd-detectron2-segment # or all
(The NO_UPDATE
is necessary to prevent make from checking out the submodule versions that come with the current ocrd_all release again.)