Now I know that this question has been asked before at: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings but I have tried doing everything that all the answers said to do but nothing works.
I am using Visual Studio Code to run a Python file, however when I try running the file using the 'Run Python File' play button in the top right corner, it gives me this error: Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
I have made sure that python is installed, but just to be sure I uninstalled and reinstalled it again. I also made sure to check the box saying 'Add Python to PATH' before reinstallation. Furthermore I have also tried doing as the message prompts you to, and turned off the shortcut from Settings > Manage App Execution Aliases; but when I do that it gives me the following error:
& : The term 'C:/Users/haide/AppData/Local/Microsoft/WindowsApps/python.exe' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:3
- & C:/Users/haide/AppData/Local/Microsoft/WindowsApps/python.exe "g:/M ...
-
+ CategoryInfo : ObjectNotFound: (C:/Users/haide/...Apps/python.exe:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
I have also manually checked the PATH in System Properties > Environment Variables and it's fine there as well. I have also made sure that I am in powershell in the terminal rather than cmd. The file does run if I type py filename.py in the terminal, but why is the play button not working, even though it was working until yesterday?