AI-Riksarkivet / htrflow

HTRflow is the underlying engine for our HTR-pipeline
https://ai-riksarkivet.github.io/htrflow
European Union Public License 1.2
16 stars 3 forks source link

Unable to install on python 3.12.3 #22

Closed bjarman closed 1 month ago

bjarman commented 1 month ago

What happened?

I am unable to install on python 3.12.3

Steps To Reproduce

pip install htrflow"[all,openmmlab]"

Relevant log output

Collecting htrflow[all,openmmlab]
  Downloading htrflow-0.1.1-py3-none-any.whl.metadata (26 kB)
Collecting jinja2==3.1.3 (from htrflow[all,openmmlab])
  Downloading Jinja2-3.1.3-py3-none-any.whl.metadata (3.3 kB)
Collecting lorem<0.2,>=0.1.1 (from htrflow[all,openmmlab])
  Downloading lorem-0.1.1-py3-none-any.whl.metadata (2.3 kB)
Collecting matplotlib<4,>=3.8.3 (from htrflow[all,openmmlab])
  Downloading matplotlib-3.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (11 kB)
Collecting numpy==1.26.4 (from htrflow[all,openmmlab])
  Downloading numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.0/61.0 kB 2.3 MB/s eta 0:00:00
Collecting opencv-python>=4.6.0 (from htrflow[all,openmmlab])
  Downloading opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (20 kB)
Collecting requests<3,>=2.31.0 (from htrflow[all,openmmlab])
  Downloading requests-2.32.3-py3-none-any.whl.metadata (4.6 kB)
Collecting tqdm<5,>=4.66.2 (from htrflow[all,openmmlab])
  Downloading tqdm-4.66.5-py3-none-any.whl.metadata (57 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 57.6/57.6 kB 3.6 MB/s eta 0:00:00
Collecting xmlschema<4,>=3.0.2 (from htrflow[all,openmmlab])
  Downloading xmlschema-3.4.2-py3-none-any.whl.metadata (8.3 kB)
Collecting accelerate>=0.33.0 (from htrflow[all,openmmlab])
  Downloading accelerate-0.34.2-py3-none-any.whl.metadata (19 kB)
Collecting bitsandbytes>=0.43.3 (from htrflow[all,openmmlab])
  Downloading bitsandbytes-0.43.3-py3-none-manylinux_2_24_x86_64.whl.metadata (3.5 kB)
Collecting datasets>=2.17.1 (from htrflow[all,openmmlab])
  Downloading datasets-3.0.0-py3-none-any.whl.metadata (19 kB)
Collecting huggingface-hub>=0.24.6 (from huggingface-hub[cli]>=0.24.6; extra == "all"->htrflow[all,openmmlab])
  Downloading huggingface_hub-0.25.0-py3-none-any.whl.metadata (13 kB)
Collecting jiwer>=3.0.4 (from htrflow[all,openmmlab])
  Downloading jiwer-3.0.4-py3-none-any.whl.metadata (2.6 kB)
Collecting pagexml-tools>=0.5.0 (from htrflow[all,openmmlab])
  Downloading pagexml_tools-0.5.0-py3-none-any.whl.metadata (5.0 kB)
Collecting pandas>=2.2.2 (from htrflow[all,openmmlab])
  Downloading pandas-2.2.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB)
Collecting rich>=13.7.1 (from htrflow[all,openmmlab])
  Downloading rich-13.8.1-py3-none-any.whl.metadata (18 kB)
Collecting transformers>=4.44.1 (from transformers[torch]>=4.44.1; extra == "all"->htrflow[all,openmmlab])
  Downloading transformers-4.44.2-py3-none-any.whl.metadata (43 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 43.7/43.7 kB 2.5 MB/s eta 0:00:00
Collecting typer>=0.12.0 (from htrflow[all,openmmlab])
  Downloading typer-0.12.5-py3-none-any.whl.metadata (15 kB)
Collecting ultralytics>=8.0.225 (from htrflow[all,openmmlab])
  Downloading ultralytics-8.2.97-py3-none-any.whl.metadata (39 kB)
Collecting mmcv (from htrflow[all,openmmlab])
  Downloading mmcv-2.2.0.tar.gz (479 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 479.1/479.1 kB 24.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting mmdet==3.1.0 (from htrflow[all,openmmlab])
  Downloading mmdet-3.1.0-py3-none-any.whl.metadata (28 kB)
Collecting mmengine==0.7.2 (from htrflow[all,openmmlab])
  Downloading mmengine-0.7.2-py3-none-any.whl.metadata (18 kB)
Collecting mmocr==1.0.1 (from htrflow[all,openmmlab])
  Downloading mmocr-1.0.1-py2.py3-none-any.whl.metadata (17 kB)
INFO: pip is looking at multiple versions of htrflow[all,openmmlab] to determine which version is compatible with other requirements. This could take a while.
ERROR: Ignored the following versions that require a different python version: 0.1.0 Requires-Python >=3.8,<3.11; 0.1.1 Requires-Python >=3.8,<3.11; 0.2.0 Requires-Python >=3.8,<3.11; 0.2.1 Requires-Python >=3.8,<3.11; 0.3.0 Requires-Python >=3.8,<3.12; 0.3.1 Requires-Python >=3.8,<3.12; 0.3.2 Requires-Python >=3.8,<3.12; 0.3.3 Requires-Python >=3.8,<3.12; 0.3.4 Requires-Python >=3.8,<3.12; 0.4.0 Requires-Python >=3.8,<3.12; 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11; 8.0.10 Requires-Python >=3.7,<=3.11; 8.0.11 Requires-Python >=3.7,<=3.11; 8.0.12 Requires-Python >=3.7,<=3.11; 8.0.13 Requires-Python >=3.7,<=3.11; 8.0.14 Requires-Python >=3.7,<=3.11; 8.0.15 Requires-Python >=3.7,<=3.11; 8.0.16 Requires-Python >=3.7,<=3.11; 8.0.17 Requires-Python >=3.7,<=3.11; 8.0.18 Requires-Python >=3.7,<=3.11; 8.0.19 Requires-Python >=3.7,<=3.11; 8.0.20 Requires-Python >=3.7,<=3.11; 8.0.21 Requires-Python >=3.7,<=3.11; 8.0.22 Requires-Python >=3.7,<=3.11; 8.0.23 Requires-Python >=3.7,<=3.11; 8.0.24 Requires-Python >=3.7,<=3.11; 8.0.25 Requires-Python >=3.7,<=3.11; 8.0.26 Requires-Python >=3.7,<=3.11; 8.0.27 Requires-Python >=3.7,<=3.11; 8.0.28 Requires-Python >=3.7,<=3.11; 8.0.29 Requires-Python >=3.7,<=3.11; 8.0.30 Requires-Python >=3.7,<=3.11; 8.0.31 Requires-Python >=3.7,<=3.11; 8.0.32 Requires-Python >=3.7,<=3.11; 8.0.33 Requires-Python >=3.7,<=3.11; 8.0.34 Requires-Python >=3.7,<=3.11; 8.0.7 Requires-Python >=3.7,<=3.11; 8.0.8 Requires-Python >=3.7,<=3.11; 8.0.9 Requires-Python >=3.7,<=3.11
ERROR: Could not find a version that satisfies the requirement torch==2.0.0; extra == "openmmlab" (from htrflow[all,openmmlab]) (from versions: 2.2.0, 2.2.1, 2.2.2, 2.3.0, 2.3.1, 2.4.0, 2.4.1)
ERROR: No matching distribution found for torch==2.0.0; extra == "openmmlab"
viklofg commented 1 month ago

Hi!

Thanks for opening an issue.

We've yet only used and tested HTRflow in a Python 3.10 environment. We're working on extending the support to newer versions, but in the meantime, run HTRflow with Python 3.10.

Also ~ HTRflow's installation process was recently updated. Instead of pip install htrflow[all,openmmlab], use pip install htrflow, without any extras. The extra openmmlab was dropped because it did not work properly. If you need to use OpenMMLabs models (Satrn or RTMDet), see my reply in another issue for instructions. (Or soon in the documentation!)

Hope this helps!