Skip to content

uv sync does not respect VIRTUAL_ENV #267

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

Closed
johnthagen opened this issue Apr 10, 2025 · 1 comment · Fixed by #268
Closed

uv sync does not respect VIRTUAL_ENV #267

johnthagen opened this issue Apr 10, 2025 · 1 comment · Fixed by #268
Labels
bug Something isn't working

Comments

@johnthagen
Copy link
Owner

johnthagen commented Apr 10, 2025

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.

@johnthagen johnthagen added the bug Something isn't working label Apr 10, 2025
@johnthagen
Copy link
Owner Author

A good resource

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.

1 participant