1. Under the View menu select Command Palette... F1 (or press F1 key).

  2. Type Python: Select Interpreter.

  3. Choose which Python version to use by default [1].


[1] You can safely disregard the "Recommended" hint, which is usually the bare bones system one, without access to your custom packages.

Answer from Natsfan on Stack Overflow
🌐
Visual Studio Code
code.visualstudio.com › docs › python › environments
Python environments in VS Code
November 3, 2021 - Click the environment to change it. When you assign an environment to a project, the extension writes to your workspace settings (.vscode/settings.json): { "python-envs.pythonProjects": [ { "path": "backend", "envManager": "ms-python.python:venv" }, { "path": "ml-service", "envManager": "ms-python.python:conda" } ] } Notice that settings store the environment manager, not hardcoded interpreter paths.
Discussions

Changing Python Interpreter Path setting not working
Use ctrl + shift +p to open the command palette, then search and select Python:Select Interpreter, select the interpreter you need in the Select Interpreter palette. Then create a new terminal to activate the environment. A good approach is to use a virtual environment so that it doesn't clutter the environment. Because currently using the vscode terminal to print python --version may not follow the system environment variables. More on reddit.com
🌐 r/vscode
5
0
October 28, 2022
Need to select Python interpreter in VS code
I have a warning message ‘Select Interpreter’ for python in VS code what I need to do and how? (all the python files run successfully) More on forum.robotframework.org
🌐 forum.robotframework.org
5
0
March 18, 2025
Issue with the interpreter in Visual Studio Code
I have to have Visual Studio downloaded on my Microsoft Surface Pro, 11th Edition; and what I've done so far is: First download Python from the web, I've gotten the version 3.14(64-bit), I've opened it and have tested if it works, it does. Then I've… More on learn.microsoft.com
🌐 learn.microsoft.com
2
0
October 23, 2025
Virtual Environments in vscode, Change python path in Windows - Python - Code with Mosh Forum
Hi friends, I am taking Complete Python Mastery course and stuck at 10-Python Package Index —> 5-Virtual Environments in VScode —> about 2:01 minutes into the video The part of video talking about changing the Python path. But I think Mosh did it on Mac. Anyone know how to do it in Windows? More on forum.codewithmosh.com
🌐 forum.codewithmosh.com
0
April 28, 2021
🌐
Posit
docs.posit.co › ide › server-pro › user › vs-code › guide › python-environments.html
Python Environments in VS Code – Posit Workbench Documentation Release 2026.04.0
Then type “Python: Select Interpreter”. Alternatively, you can click on the current interpreter in the bottom right corner. VS Code will automatically detect available interpreters and virtual environments. If VS Code does not automatically detect your desired interpreter, you can manually ...
🌐
Robot Framework
forum.robotframework.org › tools
Need to select Python interpreter in VS code - Tools - Robot Framework
March 18, 2025 - I have a warning message ‘Select Interpreter’ for python in VS code what I need to do and how? (all the python files run successfully)
🌐
Visual Studio Code
code.visualstudio.com › docs › languages › python
Python in Visual Studio Code
November 3, 2021 - To change the current interpreter, which includes switching to conda or virtual environments, select the interpreter name on the Status Bar or use the Python: Select Interpreter command.
Find elsewhere
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 5594952 › issue-with-the-interpreter-in-visual-studio-code
Issue with the interpreter in Visual Studio Code - Microsoft Q&A
October 23, 2025 - If you don’t see any options, click "Enter interpreter path" → then "Find...". Browse to your Python location (e.g., C:\Users\YourName\AppData\Local\Programs\Python\Python314\python.exe) and select it.
🌐
Code with Mosh
forum.codewithmosh.com › python
Virtual Environments in vscode, Change python path in Windows - Python - Code with Mosh Forum
April 28, 2021 - Hi friends, I am taking Complete Python Mastery course and stuck at 10-Python Package Index —> 5-Virtual Environments in VScode —> about 2:01 minutes into the video The part of video talking about changing the Python p…
🌐
Visual Studio Code
code.visualstudio.com › docs › python › settings-reference
Python settings reference
November 3, 2021 - The Python Extension for Visual Studio Code is highly configurable.
🌐
Visual Studio Code
code.visualstudio.com › docs › python › python-tutorial
Getting Started with Python in VS Code
November 3, 2021 - Tip: If you enter the above code by hand, you may find that auto-completions change the names after the as keywords when you press Enter at the end of a line. To avoid this, type a space, then Enter. Next, run the file in the debugger using the "Python: Current file" configuration as described in the last section. You should see the message, "ModuleNotFoundError: No module named 'numpy'". This message indicates that the required package isn't available in your interpreter.
🌐
GitHub
github.com › microsoft › vscode-python › issues › 23833
Python interpreter settings ignored if VS Code is launched from an activated environment · Issue #23833 · microsoft/vscode-python
July 18, 2024 - I assume part of the problem is that the way my system is configured, I almost always have a python virtual environment activated. As I always launch vscode from the terminal, it seems to try to use the interpreter from the environment I launched it from, rather than the interpreter I have set.
Author   julianstirling
🌐
Visual Studio Code
code.visualstudio.com › docs › python › python-quick-start
Quick Start Guide for Python in VS Code
November 3, 2021 - From the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)), select the Python: Start REPL command to open a REPL terminal for the currently selected Python interpreter. In the REPL, you can then enter and run lines of code one at a time. The debugger is a helpful tool that allows you to inspect the flow of your code execution and more easily identify errors, as well as explore how your variables and data change as your program is run.
🌐
Microsoft Learn
learn.microsoft.com › en-us › visualstudio › python › managing-python-environments-in-visual-studio
Manage Python Environments and Interpreters - Visual Studio (Windows) | Microsoft Learn
You can also review and modify details of the environment at any time in the Python Environments window. In the Python Environments window, select the environment, and then select the Configure tab. After you make changes, select the Apply command.
🌐
TMS Outsource
tms-outsource.com › home › how to change python interpreter in vscode
How to Change Python Interpreter in VSCode
November 12, 2025 - Without a workspace, VSCode cannot persist your choice between sessions. Click the Python version displayed in the status bar (bottom-right corner). This opens the interpreter list instantly.
🌐
DEV Community
dev.to › kcl › how-to-set-default-python-interpreter-in-vs-code-194f
How to Set Default Python Interpreter in VS Code - DEV Community
June 20, 2022 - Now at the bottom left you will be able to see the python interpreter name like in the pic above >>> Python 3.9.4 64-bit <<<
🌐
Visual Studio Code
code.visualstudio.com › docs › python › editing
Editing Python in Visual Studio Code
November 3, 2021 - If you are importing a package that is not installed, you can install it by running the following command in an activated terminal: python -m pip install {package_name}. If you are importing a package that is already installed in a different interpreter or kernel, select the correct interpreter.
Top answer
1 of 2
2

Maybe Virtual Studio Code does not use the same shell that you're using with iTerm2? According to the docs on the integrated terminal, the shell that is being used is the one which is set by the $SHELL environment variable. Inspect it with:

echo $SHELL

Furthermore, which scans your $PATH for an executable and return the first one found. So compare your settings there, too:

echo $PATH

If that is the issue, you can change $PATH, so it will find the python in /Users/anders/anaconda3/bin instead of /usr/bin.

Finally, it might help you to set an alias for python in the Visual Studio Code integrated terminal. You can set that up with:

$ alias python
bash: alias: python: not found
$ alias python=/Users/anders/anaconda3/bin/python
$ alias python
alias python='/Users/anders/anaconda3/bin/python'

(which might still show the other path, but if you run python, you'll get the one from the alias.)

2 of 2
0

I found a way to reset VS Code such that it works again.

Step one: Reset your $PATH variable -> this is temporary because all sorts of funky stuff starts to happen if you reset this:

$cd #go to home directory

$nano .bash_profile

# while in nano:

\export PATH="[path to anaconda python3]"

# save and exit

# reset .bash_profile

$. .bash_profile

now we need to set PATH to what it was, but nanowill no longer work, so we put following into the terminal:

$usr/bin/nano ~/.bash_profile

delete the line "\export PATH="[path to anaconda python3]""

# reset .bash_profile again

$. .bash_profile

Now if you open up VS Code (or a new terminal in VS Code), it should work!

🌐
Super User
superuser.com › questions › 1823161 › vscode-integrated-terminal-pointing-to-different-python-version
visual studio code - VSCode Integrated terminal pointing to different python version - Super User
December 26, 2023 - See screenshot, the above is my regular terminal, and the one below is VSCode's integrated terminal. The terminal is configured to use /bin/bash and .py files to run with $pythonPath -u $fullFileName. The selected interpreter is ~/venv/bin/python3.11 I've also already tried "python.termina...