Terminal feedback errors

Hi everyone! just starting out on python like many of you, i have more experience with pycharm than visual studio. so my question is, why am i getting this error:

app.py : The term ‘app.py’ 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:1

  • app.py
  •   + CategoryInfo          : ObjectNotFound: (app.py:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException

when trying to speak to the terminal, i tried rewatching how mosh does it but i am using windows not a mac and he doesnt get into detail about it he just says its supposed to work automatically. is there a setting i need to change? im also typing these things into visual code:

PS C:\Visual Code files> python

PS C:\Visual Code files> $python
PS C:\Visual Code files> app.py

You should type only

pyhon app.py

In the same directory as app.py. Do not pre-fix a $-sign.

1 Like

Thanks for the response!

When I type that which I have tried as well, it gives me another odd response:

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 python downloaded via website. However when i go to the webstore it does show I do not have python downloaded both are current update files as well.

I am having the same problem. Do u have any fixes?

Download from Python Releases for Windows.

During the installation you will see a checkbox that says “Include in PATH”. You need to click this in order for command prompt to know about Python.

PATH is a system variable with that contains paths to executable files in your system, as well as other things. When you type commands into the command line then the PATH will be used to search for the command. Since you are typing python, then it will look through the PATH variable to see if it can find python. If it finds it then it will be ran. The app.py part is an argument, telling the python command what to run…app.py.

For any of that to work then you must add python to the PATH variable. You can do this manually or with the checkbox that displays during install. I suggest you click the checkbox, but read about PATH variable here What is PATH Variable?