I'm new to coding and just started using Visual Studio to learn Python. In a tutorial video, the professor said that I can hit Ctrl + Alt + N to automatically run my code. I get the error "[Running] python -u "c:\\Users***\\Desktop\\Test\\app.py" 'python' is not recognized as an internal or external command, operable program or batch file." I am able to run it when I go to my terminal and run through CMD but not when I do the shortcut. I looked through settings and there wasn't anything I saw that stood out. Any suggestions?
Thanks
Open the Start Search, type in “env”, and choose “Edit the system environment variables”:
Click the “Environment Variables…” button
Click on Path variable
Click on edit button
Create a new address, where you have installed python. The default address is C:\\Python34
Save and exit the window
Install Python extension on VScode
Restart VScode
If the problem continues, open command palette ( CTRL + Shift + p )
9.1. Type Python
9.2. Select python interpreter from the drop down menu
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.