Python Interpreter Not Found VSCode

Viewed 15951

So I am having an issue ever since I accidentally deleted python, when I reinstalled it VSCode kept giving me an issue 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 my brothers laptop it shows the interpreters. Python is already in the Path.

3 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

I was having same issue with python interpreter but when I completely uninstalled my python package and reinstalled the latest version which currently is 3.9.6 , and it perfectly worked.

I uninstalled python latest version v3.10.2 and reinstalled v3.9.7 and its working perfectly without no issue.

Related