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

uv pip install --no-deps fails due to conflicting requirements even though the --no-deps flag is given #3183

Closed
bluthej opened this issue Apr 22, 2024 · 1 comment · Fixed by #3191
Assignees
Labels
bug Something isn't working

Comments

@bluthej
Copy link

bluthej commented Apr 22, 2024

Context

I have a special use case for a client whereby I need to provide some libraries which they install via a requirements.txt.
The purpose of this file is only to list the libraries I provide (as local paths), and there is another requirements file for the external dependencies.
We work like this because in my company we use git dependencies for our own libraries but our client does not have access to our private git repos.

The install instructions for them are to do a pip install for the external dependencies (pulled from PyPI), and then a second pip install with the requirements file I provide them. This works fine with pip, but not with uv pip because the top-level library depends on the other libraries via git dependencies (specified in a pyproject.toml), but they are also listed in the requirements.txt. This leads to:

error: Requirements contain conflicting URLs for package `blargh`:

even though I provide the --no-deps flag. With this flag, it works fine with pip. So it seems to me like there is some conflict resolution that's taking place for the git dependencies that should not be happening with --no-deps.

Here is the full command I run:

uv pip install --no-deps -r requirements.txt

Platform and uv version

I am on Linux with uv 0.1.35.

@charliermarsh charliermarsh self-assigned this Apr 22, 2024
@charliermarsh charliermarsh added the bug Something isn't working label Apr 22, 2024
@charliermarsh
Copy link
Member

Thanks, I can guess what's going on here.

charliermarsh added a commit that referenced this issue Apr 22, 2024
#3191)

## Summary

This PR avoids: (1) using the lookahead resolver when `--no-deps` is
specified (we'll never use those requirements), and (2) including any
transitive requirements when searching for allowed URLs, etc., when
`--no-deps` is specified.

Closes #3183.
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

Successfully merging a pull request may close this issue.

2 participants