Skip to content

More troubleshooting tips for 'py' command not found #223

@RussellHuizinga

Description

@RussellHuizinga

Background

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions