You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
More troubleshooting tips for 'py' command not found #223
This issue I encountered is largely self inflicted. But I feel what I learned could be added to the troubleshooting documentation or this post itself can hopefully help anyone who puts themselves in a similar predicament.
I was encountering the issue where 'py' gives me a “command not found” error when I type it in my terminal. I followed the troubleshooting documentation, but was still unable to call the command.
Two things combined contributed to my issue, I recently upgraded my windows install to windows 11, and I decided to reinstall Python using the Python Install Manager downloaded from the Microsoft Store. Before my Windows upgrade, I backed up my path and system variables, and at some point in my life with windows 10, I likely removed or never had "%USERPROFILE%\AppData\Local\Microsoft\WindowsApps". This appears to be where windows places the app execution aliases, I can even see the contents of the folder update when I switch the App Execution Aliases on and off. Adding this folder to path resolved my problems.
Details
Not sure if its worth adding to the troubleshooting doc, this is possibly an edge case. But I thought I would write something here to suggest that things to try could be expanded to check that the path contains the expected folder.
That's a good tip. You aren't the first person to remove that directory entirely, and plenty of people have been trapped by dodgy installers that duplicate and move the directory. Having a troubleshooting step that gives the right setting is probably helpful (I wish Windows would just fix it automatically, but alas...)
Activity
zooba commentedon Nov 20, 2025
That's a good tip. You aren't the first person to remove that directory entirely, and plenty of people have been trapped by dodgy installers that duplicate and move the directory. Having a troubleshooting step that gives the right setting is probably helpful (I wish Windows would just fix it automatically, but alas...)
zooba commentedon Jan 15, 2026
The troubleshooting docs now include this tip.