-
Notifications
You must be signed in to change notification settings - Fork 149
Open
Description
Hello!
Setting UV_PYTHON to a different Python version than the one that was used to install build raises an error.
$ uv init --python 3.13 --lib
$ UV_PYTHON=3.13 uvx --python 3.14 --from build pyproject-build --installer uv
error: No virtual environment found for Python 3.13; run `uv venv` to create an environment, or pass `--system` to install into a non-virtual environmentThis error is caused by the uv pip install command that prioritizes UV_PYTHON over the Python version of the virtual environment that is created by build.
Should UV_PYTHON be dropped from the environment variables that are passed to the subprocess, set to an empty string, to the Python version of the current interpreter, or to the path to the current interpreter?
This might be an edge case but it happened to me!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels