DS4SD / docling-parse

Simple package to extract text with coordinates from programmatic PDFs
MIT License
30 stars 8 forks source link

Support for installation using poetry for python > 3.9 #65

Closed ashwan1 closed 6 days ago

ashwan1 commented 1 week ago

Currently docling-parse specifies python as ^3.9. This causes issue while installing docling using poetry with python > 3.9. Can we please broaden the scope here?

PeterStaar-IBM commented 1 week ago

@dolfim-ibm Do you understand the request above? I thought it was already satisfied.

dolfim-ibm commented 1 week ago

🤔 Not really.

@ashwan1 can you please provide more details on the issues you see?

ashwan1 commented 1 week ago

I am getting following error:

poetry add docling-parse
Using version ^2.1.1 for docling-parse

Updating dependencies
Resolving dependencies... (5.3s)

Package operations: 1 install, 4 updates, 0 removals

  - Updating pywin32 (307 -> 308)
  - Updating numpy (1.26.4 -> 2.1.3)
    →  74│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       75│
       76│         # Get the best link
       77│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       78│

Cannot install docling-parse.

I am using python 3.10. In docling-parse's pyproject.yaml, python 3.9 is mentioned.

dolfim-ibm commented 1 week ago

^3.9 means >=3.9,<4.0. we use and test Docling on python 3.9, 3.10, 3.11, and 3.12 without any issue.

From your post, could it be the issue is actually the numpy version?

ashwan1 commented 1 week ago

I updated my numpy. Still getting same error:

Using version ^2.1.1 for docling-parse

Updating dependencies
Resolving dependencies... (3.0s)

Package operations: 1 install, 0 updates, 0 removals

  - Installing docling-parse (2.1.1): Failed

  RuntimeError

  Unable to find installation candidates for docling-parse (2.1.1)

  at ~\.local\pipx\venvs\poetry\lib\site-packages\poetry\installation\chooser.py:74 in choose_for
       70│
       71│             links.append(link)
       72│ 
       73│         if not links:
    →  74│             raise RuntimeError(f"Unable to find installation candidates for {package}")
       75│
       76│         # Get the best link
       77│         chosen = max(links, key=lambda link: self._sort_key(package, link))
       78│

Cannot install docling-parse.

Just to clarify, this only happens with poetry.

dolfim-ibm commented 1 week ago

Is this all the poetry output you get? It is weird.

Can you share the actual poetry command you are running? And also the poetry version?

ashwan1 commented 1 week ago

Yes, that's all the output poetry version: 1.8.2 cmd - poetry add docling-parse

dolfim-ibm commented 1 week ago

I tried with a minimal example (using the latest poetry 1.8.4) and I can add docling-parse without any issue, also when using python=^3.10 in pyproject.toml. Can you please try to make a minimal example who could debug?

ashwan1 commented 1 week ago

Here is repo that you can use to replicate. I am using windows 10, if that can be of any use.

aleph01 commented 6 days ago

docling-parse 2.1.1 has fewer wheels available than previous versions.

PeterStaar-IBM commented 6 days ago

@aleph01 Please rebase to v2.1.0 -> for some reason, we had an incomplete wheel set for 2.1.1

(we are fixing it now).