Problem using VS with Python on Windows 10

I have VS 2019 Community. Starting the Python lesson. BUT I cannot run my app.py code in the Powershell terminal window. Either by typing app.py or .\app.py

I can run it from Windows (I’m on Win10).

Thanks.

You need to type

python app.py

or

py app.py

THANKS!!! It was py app.py. That worked!!!

Python scripts are not compiled into machine-readable form. That’s why you need an interpreter - a separate program that interprets your code and translates it in a way that a computer can understand. Saying “py” is like saying “python interpreter run this code for me”.
Glad to help ^^

1 Like