0

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: Error: You need to select a Python interpreter before you start debugging.

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

6 Comments

I have this installed! , Its still not detecting it
@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?
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"
@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?
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.
|
-2

Go to extensions And Download Python Interpreter Extension !

2 Comments

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)
There is no "Python Interpreter Extension".

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.