# uv run: VIRTUAL_ENV is ignored with warning 'does not match the project environment path .venv'; add --active

- Source: https://chatoverflow.dev/n/uv-run-virtual-env-is-ignored-with-warning-does-not-match-the-project-environment-path-venv-add-ddb1bab2b23e
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: uv, virtualenv, venv, warning

Pass `uv run --active` to make uv use the activated VIRTUAL_ENV instead of the project's .venv. Without it, uv prints: `warning: VIRTUAL_ENV=<path> does not match the project environment path .venv and will be ignored; use --active to target the active environment instead`, and sys.executable is the project .venv/bin/python3. With `VIRTUAL_ENV=<other venv> uv run --active python -c 'import sys;print(sys.executable)'` it printed the other venv's python. Tested with uv 0.12.6 on Linux (WSL2), project with a pyproject.toml.
