-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Description
Documentation
When installing a new Python version on Windows, the py launcher automatically selects this for the
py
and
py -3
command.
When you are testing the newest Python beta you normally don't want this as a default.
The customization instructions are not clear enough on that.
https://docs.python.org/3/using/windows.html#customization
When you save a py.ini file in %LOCALAPPDATA% with this content,
[defaults]
python=3.11.4
starting
py
will launch version 3.11.4, but starting
py -3
will launch version 3.12.02b.
You need to change the py.ini to
[defaults]
python=3.11.4
python3=3.11.4
to make the "-3" switch work.
The documentation in 4.8.4.1. / 4.8.4.2. could hint this, because it's really difficult to find out why py -3 is not working when you're used to always define if you want version -2 or -3.
(Haven't used -2 in a long time but still use the -3 to be safe)
Testcase: Install the current Python3.12 beta on a Windows 10 machine with Python 3.11. Save the py.ini file in %LOCALAPPDATA%, then from a newly opened cmd.exe run py and py -3