For me, when craft tries to update python, it fails because the binary is
in use by craft itself. This patch aims to fix that, by using the python3
binary specified in CraftSettings.ini
Yes, the issue happens on Windows. And I think it always happens, because the line before the one I added reads: "prefix the path with dev-utils/bin"... and Craft's python3.exe is installed right there.
I'm not sure if the python bundled in craft (craft\blueprints\dev-utils\python3) or the one from the craft-kde repo (etc\blueprints\locations\craft-kde\binary\_win\python), but one of them (or both?) is being put in the PATH earlier than the python defined in the settings INI file. So it can't be upgraded by craft because it is in use.
On a side not, we probably don't need to install python3 twice, but regardless of that I think my patch is correct.
I tried to reproduce your issue and failed with the latest version of craft.
The python in CraftRoot/python is only meant to be used for for applications that need to ship python.
In your case I'd recommend to manually set $env:CRAFT_PYTHON to the system python and then force an update of the python3 wrapper.
Also make sure that Paths/Python in etc/CraftSettings.ini points to the system python.
If recrafting python3 fails, try to invoke the system python directly with craft/bin/craft.py.