Bash: <app> returns a different location than expected
App search is cached. Reset entry pip
:
hash pip
Quote man bash
:
If the name is neither a shell function nor a built-in, and does not contain a forward slash, bash searches for every PATH entry for the directory containing the executable with that name. bash uses a hash table to remember the full paths to executable files (see the hash code in the SHELL BUILTIN COMMANDS section below). A full search of directories in PATH is performed only if the command is not found in the hash table.
and the entry for hash
in the same documentation:
hash [-lr] [-p filename] [-dt] [name]
For each name, the fully qualified command file name is determined by searching directories in $ PATH and remembered.
which
always looking for your path, regardless of the hash entry.
source to share