0

I'm learning python and use VS Code as the editor and when I try to run the .py file I get the following message ,

Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.

1
  • Have you added python to environment variable PATH? Commented Feb 1, 2021 at 4:25

1 Answer 1

1

3 Ways to solve this :-

  1. If Python is not installed,then install it from python.org

  2. If its already installed then it might not have been added to path. To add python to path, search for environment variables in search bar, then edit the path option and add the python installation directory location there.

  3. OR you may just re-install python from python installer and tick the "add python to path" option

Plus I would not recommend using windows store version of python. Just use normal python installer from python.org

Sign up to request clarification or add additional context in comments.

1 Comment

after trying above and running py filename.py helped me

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.