Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error compiling langchain with pytorch CPU index URL #2377

Closed
silb-saxobank opened this issue Mar 12, 2024 · 5 comments
Closed

Error compiling langchain with pytorch CPU index URL #2377

silb-saxobank opened this issue Mar 12, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@silb-saxobank
Copy link

Compiling langchain with the pytorch CPU index URL gives an error:

thread 'main' panicked at crates/uv-resolver/src/resolution.rs:230:50:
no entry found for key

MWE:

echo langchain > requirements.txt && RUST_BACKTRACE=full uv pip compile --verbose -o requirements.out requirements.txt --extra-index-url "https://download.pytorch.org/whl/cpu"

This only (?) seems to occur with this index-url, not with any other random index-url I tested.
If I use pip-tools it seems to work fine.

Running in WSL2 with uv 0.1.17

Am I missing something obvious here?
Of course, in this MWE I can remove the extra-index-url, but in my original requirements I also need pytorch-cpu and still get this error.

Thanks in advance for the help, and thanks for creating this really cool tool!

@silb-saxobank
Copy link
Author

Could be related to #1248 ?

@silb-saxobank
Copy link
Author

silb-saxobank commented Mar 12, 2024

I'm also getting an issue when trying to compile a specific version of the requests library with the extra index URL:

echo requests==2.31.0 > requirements.txt && RUST_BACKTRACE=full uv pip compile --verbose -o requirements.out requirements.txt --extra-index-url "https://download.pytorch.org/whl/cpu"

which outputs:

  × No solution found when resolving dependencies:
  ╰─▶ Because there is no version of requests==2.31.0 and you require requests==2.31.0, we can conclude that the
      requirements are unsatisfiable.

And if I remove the extra index URL it works fine.

@konstin
Copy link
Member

konstin commented Mar 12, 2024

Langchain has been fixed in #2360, could you try running from main if that fixes your problem, too?

@charliermarsh
Copy link
Member

I suspect the requests issue is that requests exists on https://download.pytorch.org/whl/cpu, but not at that version. We stop at the first index that contains the dependency.

@charliermarsh
Copy link
Member

Closing in favor of some other issues. The no entry found for key is fixed in the latest release. The "requests not found" is discussed in detail here: #171.

@charliermarsh charliermarsh added the bug Something isn't working label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants