python.exe and other aliases not working before reinstalling the manager
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 344
- Forks
- 74
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 7
Description
Install source and version
- Installed from the Windows Store
- Installed with the MSIX from python.org
- Installed with the MSI from python.org
- Installed with
winget install 9NQ7512CXL7T
Version: 26.2.240.0
Describe the bug
I was trying to start python via the "python" command, instead of the "py" command. But it was not working.
Powershell kept giving me this error:
Program 'python.exe' failed to run: The system cannot find the path specifiedAt line:1 char:1
+ python
+ ~~~~~~.
At line:1 char:1
+ python
+ ~~~~~~
+ CategoryInfo : ResourceUnavailable: (:) [], ApplicationFailedException
+ FullyQualifiedErrorId : NativeCommandFailed
The "py" command on the other hand was working like a charm.
I've tried to:
- Refresh the python install with
py install --refresh - Unchecked and re-checked all python aliases in Windows' "Manage app execution aliases" settings.
- Re-configure the python installation with
py install --configure - Force re-installing python with
py install -f default
Nothing was working. And %UserProfile%\AppData\Local\Microsoft\WindowsApps was correctly in the PATH.
So I've tried to launch the python.exe directly present in the WindowsApps folder: Nope, same issue.
At that point, since it was an issue with the Windows app, I thought I'd try to reinstall the Python Install Manager itself from the Store. And that fixed it!
No idea what was wrong with the .exe link inside the WindowsApps folder. But this error, and this fix (reinstalling the manger itself) are not present in the troubleshooting steps in the online docs. So I'm reporting this in case another user finds itself in this same pickle, and, to perhaps include "reinstall the manger" as an additional troubleshooting step in the online docs?
To Reproduce
No idea.
I'm glad to provide log files. But dunno where to find log files related to the WindowsApps .exe files.
Expected behavior
Implement the fix found, in the troubleshooting steps.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Windows troubleshooting section in the Python documentation and review its existing troubleshooting steps. Add reinstalling the Python Install Manager as a possible fix for broken python.exe aliases, based on the reported Windows Store behavior. Done means the new guidance is clear and fits the surrounding troubleshooting instructions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100