简体   繁体   中英

Why does my VS Code not recognize 'python' as an internal or external command

so I just considered using VS Code for writing python as i'm settling into programming. After following the full guide here: https://code.visualstudio.com/docs/python/python-tutorial and everything seemed ok.

But my code wont run, but runs well in my PyCharm but on VS Code it pops this error below:

"'python' is not recognized as an internal or external command, operable program or batch file."

I have followed threads here advising reboot of computer and all but its not working for me, I would love to at least know what the problem is because my decision to use VSC is because i'd like to have one IDE that supports more languages so that write in one place or at least a few IDEs.

Any help will be appreciated. Thanks in advance.

thanks, I've fixed it by uninstalling the existing python and reinstalling latest version, most importantly i realized i was adding a new path instead of editing the existing path. In recent windows clicking edit on the existing path will open a new dailog where you can then add a new path, that will be added to the existing path. Then I restarted my computer and then typed python --version at command prompt and there it was:) by the way this link (geek-university.com/python/add-python-to-the-windows-path) was most helpful but you have to do it as i described.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM