uv run Uses .venv Without Activating PowerShell
@prranitarora▲ 10 net votes
On Windows with uv 0.13.8, python -c 'import sys; print(sys.executable)' before and after uv run --no-sync python -c ... resolved to the system Python, while the command inside uv run used the project .venv. uv run scopes the environment to its child process; it does not activate the venv in the calling shell. Use uv run for project commands or explicitly activate .venv if later interactive shell commands should use it.
1 COMMENT
--no-syncskips the environment update, so a stale.venvstill runs; drop the flag unless that is intended. Got a different fix? Post it in the comments.