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
🌐
Posit
docs.posit.co › ide › server-pro › user › vs-code › guide › python-environments.html
Python Environments in VS Code – Posit Workbench Documentation Release 2026.01.2
VS Code will automatically detect ... detected a Python project when you see a Python interpreter appear in the bottom right corner. To change the selected interpreter open the Command Palette using Cmd + Shift + P on Mac or Ctrl + Shift + P on Windows....
🌐
YouTube
youtube.com › watch
How to Change Python Version in VSCode (2024) - YouTube
In this video, I'll show you how you can change python version in vscode (visual studio code). vscode is a very popular IDE for writing code. It provides man...
Published   June 17, 2024
🌐
Code with Mosh
forum.codewithmosh.com › python
How to change code runner on vs code from python u to python 3 - Python - Code with Mosh Forum
January 19, 2022 - Hello, I am starting the python course and I am on a Mac so I need to change the default python code runner from python u to python 3. the tutorial cant be used on the current vscode version. please does anyone know how …
🌐
Bobby Hadz
bobbyhadz.com › blog › change-python-version-select-correct-interpreter-in-vscode
VS Code: Change Python version & select correct Interpreter | bobbyhadz
Make sure you have the Python extension by Microsoft installed. Click on Extensions in the left sidebar. You can also open the Extensions menu by pressing: Ctrl + Shift + X on Windows or Linux. Command + Shift + X on macOS.
🌐
YouTube
youtube.com › watch
Change Python Version in Visual Studio Code (2024 ...
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
Find elsewhere
🌐
Quora
quora.com › How-can-I-change-the-python-version-in-my-visual-studio-code-terminal
How to change the python version in my visual studio code terminal - Quora
Answer (1 of 3): This is how I solved the issue of using different versions of Python on Windows. 1. Download Python 2.x and Python 3.x , install them. 2. Add [code ]C:\Python35;C:\Python35\Scripts;C:\Python27;C:\Python27\Scripts[/code] to environment variable [code ]PATH[/code]. 3. Go to [code ...
🌐
CodeGenes
codegenes.net › blog › how-to-change-python-version-in-vscode
Mastering Python Version Switching in Visual Studio Code — codegenes.net
After changing the Python interpreter in VSCode, run this script to verify that the correct Python version is being used. Open the VSCode settings by pressing Ctrl+, (Windows/Linux) or Cmd+, (Mac).
🌐
Visual Studio Code
code.visualstudio.com › docs › python › environments
Python environments in VS Code
November 3, 2021 - 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. The extension remembers which specific environment you selected separately, and resolves it at runtime. This design makes settings shareable: No machine-specific paths: teammates don't need /Users/yourname/.venv
🌐
Brainly
brainly.com › computers and technology › high school › how do you change the python version in vs code?
how to change python version in vscode?
November 19, 2023 - To change the Python version in VSCode, you need to follow these steps: Open your command palette using the shortcut Ctrl+Shift+P (Cmd+Shift+P on macOS).
🌐
Reddit
reddit.com › r/learnpython › vscode python version
r/learnpython on Reddit: vscode python version
February 13, 2024 -

Hello

The bottom right corner of VScode says that Python 3.12 is installed but when you type python --version in the terminal it returns version 2.7. I need it to be 3.12 in the terminal so I can pip install stuff.

Can someone explain what the hell I need to do, because i've been stuck trying to figure this out for three days now.

I'm new to vscode and i've only taken one course in python so please be nice

Thankyou for your help

🌐
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 - Does anyone have an idea of what might be going on here? ... Try in Terminal>Integrated>Env: Enable Persistent Sessions to toggle this option off and restarting VSCode, to clear the PATH cache.
🌐
Stack Overflow
stackoverflow.com › questions › 68203300 › how-to-change-python-version-in-vs-code
macos - How to change python version in VS code? - Stack Overflow
@Someone_who_likes_SE both python versions could be system python required by the underlying OS, please refrain from recommending users to uninstall software, it could cause them harm. ... Vscode shown Python 2.7.16...
🌐
Microsoft Learn
learn.microsoft.com › en-au › 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 - You can find it by pressing Ctrl+Shift+P (or Cmd+Shift+P on Mac), then typing "Python: Select Interpreter" in the command palette. From there, choose the correct Python version you installed.
🌐
Alphr
alphr.com › home › how to change the python interpreter in vs code
How to Change the Python Interpreter in VS Code
March 13, 2023 - You’ll open a list on Python interpreters available on your device if you have multiple versions installed. If the Python extension doesn’t locate an interpreter, it displays a warning. Click on the Python Interpreter you want to use. VS Code will show the selected interpreter in the Status Bar at the bottom right part of the screen. It serves as a shortcut for the “Python: Select Interpreter” command and it shows when no interpreter is selected as well.
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!