rye: Unable to install langchain
Steps to Reproduce
- Create a new rye project
mkdir test,cd test,rye init - Add langchain
rye add langchain
Expected Result
Langchain should be added to the project and the log files should be created correctly.
Creating a virtualenv and installing langchain with venv, poetry and uv works. So it has something to do with rye, but I don’t know what😅
Actual Result
Initializing new virtualenv in /home/dennis/Projects/test/.venv
Python version: cpython@3.12.3
Added langchain>=0.2.3 as regular dependency
Reusing already existing virtualenv
Generating production lockfile: /home/dennis/Projects/test/requirements.lock
× No solution found when resolving dependencies:
╰─▶ Because only the following versions of packaging are available:
packaging<23.2
packaging>=24.0
and any of:
langchain-core>=0.2.0,<=0.2.1
langchain-core>=0.2.2
depends on packaging>=23.2,<24.0, we can conclude that any of:
langchain-core>=0.2.0,<=0.2.1
langchain-core>=0.2.2
cannot be used.
And because only the following versions of langchain-core are available:
langchain-core<=0.2.1
langchain-core>=0.2.2
and langchain==0.2.3 depends on langchain-core>=0.2.0, we can conclude that langchain==0.2.3 cannot be used.
And because only langchain<=0.2.3 is available and you require langchain>=0.2.3, we can conclude that the requirements are unsatisfiable.
hint: Pre-releases are available for langchain-core in the requested range (e.g., 0.2.2rc1), but pre-releases weren't enabled (try: `--prerelease=allow`)
error: could not write production lockfile for project
Caused by:
Failed to run uv compile /tmp/.tmp0AN7u3/requirements.txt. uv exited with status: exit status: 1
Version Info
rye 0.34.0
commit: 0.34.0 (d31340178 2024-05-20)
platform: linux (x86_64)
self-python: cpython@3.12.3
symlink support: true
uv enabled: true
Stacktrace
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (15 by maintainers)
Thanks for the fast response. This fixes my problem. If you like you can merge the PR where I added this as a hint to the docs.
Thanks, if you can get a repro in a Dockerfile I would love to help fix it.
I am playing around with some Dockerfiles at the moment, but there I am struggling to reproduce the error…