I've been sitting here for an hour not knowing what's going on, I'm a student so I don't really know much but I don't know what's going on over here, so here's a picture of the error:

2 Answers
This is because the Python interpreter is not selected for VSCode, and the Python extension of VSCode cannot identify the Python code through it.
The Python interpreter in VSCode refers to the Python that recognizes and interprets code, which needs to be installed outside of VSCode.
The main conditions required to run Python code in VSCode are: Python, Python extension, VSCode.
It is recommended that you could refer to this document:Use Python in VS Code.
6 Comments
Raghav Tyagi
I have this installed! , Its still not detecting it
Jill Cheng
@Raghav Tyagi What is output when you enter "python --version" in the cmd window outside of VSCode? What is displayed in the lower left corner of VScode? Could you provide us with more detailed information and the steps you tried?
Raghav Tyagi
When I enter python --version it says Python 3.8.3 the lower left corner of VSCode says "select python interpreter" , I have tried selecting it multiple times and it does nothing, I have also reinstalled python and vscode multiple times , it sometimes says "Python is not installed"
Jill Cheng
@Raghav Tyagi Could you enter the python interactive window when you enter "python" in the cmd window? Can it run code in cmd? If it does not work, it is recommended that you check your python environment variables. In addition, could you provide us with more relevant information and screenshots in a minimum?
Raghav Tyagi
yes, it works when I enter "python" in the cmd window, lately I have been running my code through sublime, but visual studio code still shows the same error.
|
Go to extensions And Download Python Interpreter Extension !
2 Comments
Raghav Tyagi
imgur.com/a/eCFsIt8 I cant figure out which one is the interpreter, also it says that python isnt installed when I did install it , Im very confused (sorry if my questions sound really dumb Im a student)
Ralf Zosel
There is no "Python Interpreter Extension".