In fact, the idea of py.exe is to locate the correct path when needed.
Run a script (or here: command) with the newest Python 2 version:
C:\> py -2 -c "import sys; print (sys.version)"
2.7.17 (v2.7.17:c2f86d86e6, Oct 19 2019, 21:01:17) [MSC v.1500 64 bit (AMD64)]
Run a script (or here: command) with the newest Python 3 version:
C:\> py -3 -c "import sys; print (sys.version)"
3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:21:23) [MSC v.1916 32 bit (Intel)]
Show installed Python versions
C:\> py -0
Installed Pythons found by py Launcher for Windows
-3.8-32 *
-2.7-64
Specify a more exact version
C:\> py -3.6 some-script.py
Showing the «real» interpreter
Printing the value of sys.executable, it can be seen that py.exe really acts as a launcher to start another executable. It also helps to find out which executable this is:
The launcher is installed under C:\Windows if Python is installed for all users. If Python is installed for one user only, the launcher goes under %LOCALAPPDATA%\Programs\Python.
/bin/python vs /usr/bin/python
A script whose shebang has #!/usr/bin/python can be executed «normally» with py /path/to/script.
However, if the shebang is #!/bin/python, the error Unable to create process using '/bin/python /path/to/script' is thrown.