I had lots of issues with pending, orphaned Python stuff recently. See this section and this section to read about it.
After a lot of patience, I had a clean Windows 10 environment related to Python.
I then downloaded version 3.14.5 and installed it with the following options set:
Custom installation
Install with admin rights
Install PyLauncher
Install for all users
Adapt installation path variable
Precompile standard library
Download debug info for the standard library
Being curious - and honestly, also a bit anxious - I was waiting for a successful installation. And luckily, it was.
The first thing I did, was opening a random DOS command window in a random directory and run the command python --version.
If that works, it means the PATH variable contains the location of the Python executable and I can start Python from everywhere on my computer.
And indeed, the result was:
C:\Users\Geert>python --version
Python 3.14.5
Neat, huh???
Since I also wrote an auto-com-port-reconnect application (see this section), I tested out this application. But to get it correctly working, I knew I still had to install the Python module pyserial, since the app was using serial communication functionality.
So, I ran the command pip install serial and after that was done my serial communication application worked fine!
I then tried to create an executable from my Python script. You therefor need pyinstaller, so I ran the command pip install pyinstaller.
This installation needed a bit more side components to get stuff right, so it took a bit longer. But in the end, this was installed correctly too.
To create an executable, run the command pyinstaller --onelevel --windowed <Python_Script>. An example is given in this section.
If you create a GUI application, add the command --windowed, since that one prevents a console window from appearing.
If you create just a command line executable, then --windowed must not be given.
So, then the command is pyinstaller --onelevel <Python_script>.