Skip to content

is uv pip sync with --find-links broken? #2688

@gwdekker

Description

@gwdekker

uv version: 0.1.24, running on MacOS.

In my use case, I want to install dependencies, some of them living as .whl files in a local directory. When running `uv pip sync ... -find-links LOCAL_PATH the whls were not found. I made a small example that reproduces the case for me, with disabled network lookup to simplify the case

Case 1: uv pip install seems to work correctly
uv -v pip install MY_PACKAGE --find-links /Users/OTHER_STUFF/libraries/.wheels --no-index
result: based on the logs, it clearly finds the package (and only starts failing later, as this package has external dependencies which it is now blocked to fetch due to no-index flag). Snippet from the log:

DEBUG Found 4 packages in `--find-links` entry: /Users/OTHER_STUFF/libraries/.wheels
DEBUG Solving with target Python version 3.11.4
DEBUG Adding direct dependency: MY_PACKAGE*
DEBUG Searching for a compatible version of MY_PACKAGE (*)
DEBUG Selecting: MY_PACKAGE==0.0.1 (MY_PACKAGE-0.0.1-py3-none-any.whl)
DEBUG Adding transitive dependency: pytest*
...

Case 2: uv pip sync seems to fail
uv -v pip sync requirements-dev2.txt --find-links /Users/OTHER_STUFF/libraries/.wheels --no-index

content of the requirements file:
MY_PACKAGE==0.0.1

Snippet from the log:

INFO Found a virtualenv through VIRTUAL_ENV at: /Users/SOME_PATH
DEBUG Cached interpreter info for Python 3.11.4, skipping probing: .venv/bin/python
DEBUG Using Python 3.11.4 environment at .venv/bin/python
DEBUG Using registry request timeout of 300s
DEBUG Found 4 packages in `--find-links` entry: /Users/OTHER_STUFF/libraries/.wheels
DEBUG Identified uncached requirement: MY_PACKAGE ==0.0.1
DEBUG Unnecessary package: ruff==0.1.13
error: MY_PACKAGE isn't available locally, but making network requests to registries was banned.

Note: there actually is a whitespace in DEBUG Identified uncached requirement: MY_PACKAGE ==0.0.1. Could this be a pointer to what is wrong?

I also tried pip-sync for case 2 instead of uv pip sync, which also seems to work.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions