
Whenever a new version of Python is installed, the py launcher will be updated, as long as the Python version being installed is newer than the py launcher. If you use just -2 or -3 as the version switch, Python will launch the most recent version of Python 2.x or Python 3.x, as indicated. In the above example, if we typed py -3.10, we’d get the 64-bit version of Python 3.10, because only the 64-bit version is present. If you don’t specify a bitness, and only one bitness of a particular version is installed, that bitness will be loaded by default. So if we just typed py -3.9, we’d get the 64-bit version of Python 3.9.įour examples of the py launcher in action. On a 64-bit machine, that would be the 64-bit edition. Note that if you provide only a version number, and not a bitness indicator, you’ll default to whichever version of Python is native to your machine’s processor type. For instance, to launch the 64-bit edition of Python 3.9, you would type py -3.9-64. To invoke a specific edition of Python, type py followed by the switch in the left-hand column for the appropriate version. The interpreter marked with an asterisk is the default.
#Set default program to open .py full
You’ll be presented with a list of all the known interpreters in the system, their version numbers, and their full paths.

To see which versions of Python are available to py, type py -0p. py by itself will drop you into the Python REPL, which you can exit as you normally would by typing quit() or Ctrl-Z. When you type py at the command line, the launcher will invoke the current default Python interpreter. In the next screen, make sure the “py launcher” option is checked. When installing Python on Windows, select the “Customize installation” option during setup. You can always run the Python interpreter directly instead, and py doesn’t interfere with other behaviors.

There is no downside to having py installed. At one point you’ll be prompted to do so, as per the screenshots shown below.
#Set default program to open .py install
The py launcher is optionally installed during the setup process when you first install Python on Windows. With a command-line switch, you see at a glance all of the Python interpreters you’ve installed, and invoke a specific version of Python, whether 32-bit or 64-bit. The py launcher-or just py for short-is a shortcut to all of the installed versions of Python on one’s system.
