Does Python installation manager override PATH and file associations?

With Python installation manager installed, when I am at a CMD prompt with an activated venv, if I run a valid Python file, such as “chicken.py”, it seems to me that CMD passes the file name to pymanager instead of resolving the “.py” file association through PATH. By coincidence, in the example below, the venv python.exe is first in PATH, and the global python.exe is literally last in PATH–with 41 other paths between them.

If I launch “chicken.py”, instead of the interpreter running the file in the current window, a new window pops open and immediately closes.

I thoroughly uninstalled Python installation manager, reinstalled it, but the behavior persists.

Microsoft Windows [Version 10.0.26200.7705]

Python installation manager 25.2

C:\Users\hunte>pymanager list
Tag            Name                            Managed By  Version  Alias
3.14[-64]   *  Python 3.14.3                   PythonCore  3.14.3   python3[-64].exe, python3.14[-64].exe
3.14t[-64]     Python 3.14.3 (free-threaded)   PythonCore  3.14.3   python3.14t[-64].exe, python3t[-64].exe
3.13[-64]      Python 3.13.12                  PythonCore  3.13.12  python3.13[-64].exe
3.13t[-64]     Python 3.13.12 (free-threaded)  PythonCore  3.13.12  python3.13t[-64].exe
3.12[-64]      Python 3.12.10                  PythonCore  3.12.10  python3.12[-64].exe
3.11[-64]      Python 3.11.9                   PythonCore  3.11.9   python3.11[-64].exe
3.10[-64]      Python 3.10.11                  PythonCore  3.10.11  python3.10.exe
3.9[-64]       Python 3.9.13                   PythonCore  3.9.13   python3.9.exe

(.venv) c:\apps\mapFolding>SET PATH
c:\apps\mapFolding\.venv\Scripts;...[41 other paths]...;C:\Users\hunte\AppData\Local\Python\bin
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC

The global association for .py will be the py.exe.
Not the python that is inside your venv.

The python.exe is on your PATH so you can run the script as

python yourscript.py

How do I undo this modification by a non-essential support utility that breaks a decades-long established behavior that remains the canonical behavior today?

You need one of the Windows experts to give a definitive answer.

What you are saying is that if you run a .py file after activating a venv the python.exe in the venv is used?

I am not sure that could ever have been made to work.

It is a long time since I used Windows but I think that the file association used to be that a .py file is run with py.exe. I think also py.exe by default (if you don’t pass e.g. -3.14) will use the python from an activated venv. I guess that the Python installation manager now associates with .py files and there is a regression in this behaviour.

I thought it used the newest python you have installed if you do not override in py.exe .ini file.

The short answer: (to the best of my knowledge) Python installation manager will always

Typing script-name.py in the terminal opens in a new window.

According to the Python docs.

There is a Python 3.14.0 “legacy py launcher”, however, and installing it does restore the expected behavior.

The full answer requires some knowledge of “recent” Windows versions that I don’t have. (My MCSE is more than 20 years old.) Vaguely speaking, at a CMD prompt, some file extensions are “resolved” as they have been for decades. But there is a more sophisticated system used everywhere else in the OS. The new MSIX-based pymanager uses the newer, almost certainly better, system. The old py launcher–well, it’s older: that makes it more familiar, but not necessarily better.

I suspect there are some relatively easy things we could do to ease the transition, and I know we could make things better by improving the documentation–but after a year of having my professional writing rudely rejected by professional coders, I’ve pretty much given up on that.