Python venv Troubleshooting Cheat Sheet/Use command -v for python

Portable shell check for command resolution.

Section: Wrong interpreter or pip

Use command -v for python

bash
bash
command -v python
Explanation

Another common way to inspect command resolution in POSIX shells.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Wrong interpreter or pip
Find python on POSIX
See which python binary your shell resolves first.
OpenIn sheetbashsame section
Find pip on POSIX
See which pip binary your shell resolves first.
OpenIn sheetbashsame section
Print sys.executable
Verify the exact interpreter the shell is using.
OpenIn sheetbashsame section
Use python -m pip for installs
Avoid ambiguity by tying pip to the active interpreter.
OpenIn sheetbashsame section
Refresh command hashing in zsh
Force zsh to refresh remembered command paths.
OpenIn sheetbash1 tag match
Activate using bash syntax
Source the activate script in bash or zsh.