Developer Fix

VS Code Python Interpreter Not Showing? Here’s the Fix

When “Python: Select Interpreter” is missing or your installed Python version does not appear, VS Code usually cannot detect Python, the extension is inactive, or the project environment is in an unexpected location.

Difficulty: Easy–Medium Time: 15–25 minutes Updated: July 2026 Works for: Windows / macOS / Linux

You open the Command Palette, choose Python: Select Interpreter, and the interpreter list is empty—or the command itself is missing. This can happen even when Python runs normally outside VS Code. The important thing is to separate two questions: Is Python installed? and Can VS Code see it?

Work through the checks below in order. Avoid reinstalling everything at the first sign of trouble; most cases come down to the Python extension, PATH, or a virtual environment that VS Code has not discovered yet.

Fix 1 — Confirm that Python is installed

Open Command Prompt, PowerShell, Terminal, or the VS Code terminal and run:

python --version

If that command is not recognised, try:

py --version

On macOS or Linux, use:

python3 --version

A version number means Python exists. If every command fails, install Python first and enable the option that adds Python to PATH on Windows. Restart VS Code after installation so it receives the updated environment variables.

Fix 2 — Install or enable the official Python extension

  1. Open Extensions with Ctrl + Shift + X.
  2. Search for Python.
  3. Install the extension published by Microsoft.
  4. If it is already installed, make sure it is enabled for the current workspace.
  5. Reload VS Code when prompted.

The interpreter command belongs to the Python extension. Without it, VS Code is only a text editor looking at a .py file and pretending everything is fine.

Fix 3 — Open a Python file before selecting the interpreter

Create or open a file ending in .py. Then press Ctrl + Shift + P and run Python: Select Interpreter. In some workspaces the Python extension activates only after a Python file is opened.

Fix 4 — Enter the interpreter path manually

Find the Python executable location:

where python

On macOS or Linux:

which python3

Then:

  1. Run Python: Select Interpreter.
  2. Choose Enter interpreter path.
  3. Select or paste the full path to python.exe or the Python executable.

Typical Windows paths include a user installation under AppData\Local\Programs\Python, a virtual environment under .venv\Scripts\python.exe, or a Conda environment. Use the path that belongs to this project—not simply the first Python you find.

Fix 5 — Make VS Code detect the project virtual environment

Open the project’s root folder rather than opening one Python file by itself. VS Code normally detects environments named .venv, venv, or env inside the workspace.

Create a fresh environment if needed:

python -m venv .venv

Activate it on Windows:

.venv\Scriptsctivate

On macOS or Linux:

source .venv/bin/activate

Reload the VS Code window and select the interpreter from .venv. A workspace environment is usually the cleanest choice because packages stay isolated from other projects.

Fix 6 — Reload VS Code and clear a stuck selection

  1. Press Ctrl + Shift + P.
  2. Run Developer: Reload Window.
  3. Open the interpreter selector again.

Also check the bottom status bar. Clicking the displayed Python version opens the interpreter list. If an old interpreter is pinned in workspace settings, open .vscode/settings.json and remove obsolete Python path entries before selecting again.

Fix 7 — Repair PATH on Windows

If Python works only through the py launcher, its installation folder may not be in PATH. Search Windows for Edit the system environment variables, open Environment Variables, and add the correct Python folder plus its Scripts folder to your user PATH.

Do not add several random Python folders. Multiple conflicting entries can make the terminal use one version while VS Code selects another.

How to verify the fix

After selecting the interpreter, open a new VS Code terminal and run:

python -c "import sys; print(sys.executable)"

The printed path should match the interpreter shown in the VS Code status bar. Then test a simple file or install packages with python -m pip so they go into that same environment.

FAQ

Why is “Python: Select Interpreter” missing?

The Microsoft Python extension is usually missing, disabled, not activated, or blocked in the current workspace.

Why does VS Code show an old Python version?

It may be using a saved workspace selection or finding an older PATH entry first. Select the executable manually and remove stale settings.

Should I choose global Python or .venv?

For most projects, choose the project’s .venv. It prevents one project’s package upgrades from breaking another.