My exact goal is to set my preferred version of python as the default when I type python3 into a command prompt or powershell prompt. I’ve tried everything but can’t figure it out.
I have the following Python versions installed (Output of py -0p):
If you type in echo %PATH% is there a non-managed Python 3.14 in the order before py? Press windows and type “env”, to edit the Path (and other env vars).
Or does the preferred Python 3.13 not have a “python3” alias?
If you’re using Bash it’s possible to set up an alias too. A good old cmd batch file is clunkier, but will work.
I still download and run the installation .exe files and click the “Make this the default Python” (for >py, not the >python3 that I never use). I believe the installer for pythonx.y could be rerun to make it the default.
Create %APPDATA%\Python\PyManager.json file with the next content:
{
"default_tag": "3.13"
}
and use one of your installed Python versions. For other settings see here.
After that you should update Python manager internal mappings:
py install --refresh
No need to restart a shell (tested using powershell only).
Note, it works only for python command, not python3. On my computer, running python3 still launches Python-3.14