which python vs PYTHONPATH
You're mixing 2 environment variables:
PATH
wherewhich
looks up for executables when they're accessed by name only. This variable is a list (colon/semi-colon separated depending on the platform) of directories containing executables. Not python specific.which python
just looks in this variable and prints the full pathPYTHONPATH
is python-specific list of directories (colon/semi-colon separated likePATH
) where python looks for packages that aren't installed directly in the python distribution. The name & format is very close to system/shellPATH
variable on purpose, but it's not used by the operating system at all, just by python.