Venv: `activate` script changes `$PATH` while executing the binary doesn't

Your first two examples are equivalent; activating the virtual environment is done primarily to modify PATH in exactly the way you do so manually in your second example.

What happens when you (try to) execute west without modifying your PATH variable depends on whether a command named west is even found, or how the “other” west command compares to the one in your virtual environment.

1 Like