Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
I think when I first installed python 5 or 6 years ago, I didn’t install it with path, so that’s where the problem started.
I have tried reinstalling (with path this time) and repairing, but it doesn’t work.
How can I fix this?
This is because of changes Microsoft introduced with a Windows 10 update. They’re supposed to make it easier for new students to get Python, but it’s been counterproductive in practice IMO.
I’ve been meaning to ask (although only out of curiousity, since I’m on Linux now): Does py know about other Python installations besides the ones created by an official python dot org installer? If so, how?
NB, @steve.dower — is there a reason this apparently gets added to the beginning of the PATH rather than the end, overriding users’ Pythons and that from Python.org? Or am I interpreting the linked SO answer incorrectly here?
There’s a bug in something that I couldn’t fully reproduce that causes some users to have the directory in their PATH twice, once at the start and once at the end. I suspect I know one common cause, and fixing it (a couple years ago) seems to have reduced issues, but ultimately any installer has a chance to break it if they mess with PATH (not us - we do it properly).
The correct entry is the one at the end. The bug causes it to be added at the start, and also to be incorrect for other users. If this happens, users need to remove the extra entry manually.