Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python Interpreter Not Found on VS Code

I accidentally deleted python, then when I reinstalled it, VS Code kept showing me an error saying

You need to select a Python Interpreter before you start debugging. Tip: click on "Select Python Interpreter" in the status bar."

When I go to the bar there are no interpreters available. When I try on someone else's laptop it shows the interpreters.

Python is already in the PATH.

like image 958
Khizar Haider Avatar asked Apr 17 '26 17:04

Khizar Haider


1 Answers

You should find and choose python interpreter manually:

  1. Ctrl+Shift+P, Python: Select Interpreter

  2. Enter interpreter path – Find (or enter the path manually) enter image description here

  3. Find your python.exe in your python installation path, the default path is like:

    C:\Users\***\AppData\Local\Programs\Python\Python37
    
  4. Check if the problem is solved

OR you can take the following steps to override settings for interpreter

  1. Ctrl+Shift+P, Preferences: Open Settings(JSON)

  2. Copy your python path

  3. Add line like this, paste and replace the path:

    "python.pythonPath": "C:\\Users\\***\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe"
    
  4. Ctrl+S to save the changes.

See more for macOS/Linux:
https://code.visualstudio.com/docs/python/environments#_manually-specify-an-interpreter

like image 96
CodeBunny Avatar answered Apr 20 '26 07:04

CodeBunny



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!