Skip to content

uv sync does not respect VIRTUAL_ENV #267

@johnthagen

Description

@johnthagen

Oversight in

uv sync does not respect VIRTUAL_ENV like Poetry did

#14 [python_builder 6/9] RUN uv sync --locked --no-default-groups --no-install-project
#14 0.113 warning: `VIRTUAL_ENV=/opt/venv` does not match the project environment path `.venv` and will be ignored; use `--active` to target the active environment instead

In the case of python-blueprint it ends up "working" because

RUN uv build && \
    pip install dist/*.whl

will install the (unlocked) dependencies for the project.

The recommended alternative from uv is UV_PROJECT_ENVIRONMENT

Or the default .venv could be hard-coded.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions