Closed souzatharsis closed 2 weeks ago
Is there a way we can use docling with numpy (>=1.26.0,<2.0.0) while langchain does not upgrade to numpy (>=2.0.0) to enable docling/langchain integration?
same with langchain-community
Since docling for content generation for llms is an important use case Since langchain is the most used llm framework today We would love your help in solving this critical issue.
Thanks!
@souzatharsis,
TLDR:
Check if Python 3.13 is among the Python versions allowed by your pyproject.toml and if so, remove it and try again.
E.g., if you have python = "^3.10"
, use python = ">=3.10,<3.13"
instead.
Details: Numpy is only adding Python 3.13 support starting in some 2.x.y version. In order to prepare for 3.13, Docling depends on a 2.x.y for 3.13, otherwise depending an 1.x.y version (source). If you are allowing 3.13 in your pyproject.toml, Poetry will try to find some way to reconcile Docling's numpy version for 3.13 (some 2.x.y) with LangChain's version for that (some 1.x.y) — leading to the error above.
Let me know if that helped.
👉 Also keep an eye on our recent LangChain PR: we expect to have native LangChain support very soon 😉
Thank you so much; that resolved the issue!
Bug
Installing docling (>=2.4.1,<3.0.0) in a project with langchain (any version) dependency fails.
So, because my project depends on both langchain (^0.3.3) and numpy (>=2.0.2,<3.0.0), version solving failed.
Steps to reproduce
Docling version
(>=2.4.1,<3.0.0)
Python version
Python 3.11