Under the
Viewmenu selectCommand Palette... F1(or press F1 key).Type
Python: Select Interpreter.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 OverflowUnder the
Viewmenu selectCommand Palette... F1(or press F1 key).Type
Python: Select Interpreter.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.
Several of the answers here explain good approaches, but below are my top 2 recommendations.
1) Bottom Screen Navigation (ease of access)
- I find this the quickest approach; however, it isn't always available for first-time users. If you're already using Python in VS Code, this is usually the easiest way to reach the Python: Select Interpreter menu. On the bottom left of your screen, look for "Python X.X.X". This is the currently detected/configured version of Python for your project, and clicking it brings you to the interpreter menu to change the Python version you're using. At the time of writing, I was using Python 3.9.1 as seen in the snippet below:

2) Command Palette
- As @jmh denoted in his answer, you can also use the 'View' tab to navigate to the Command Palette. In the Command Palette, search for Python: Select Interpreter to bring about the same menu denoted above.
If you're still having issues, there's also a VS Code Getting Started guide that walks you through setting up Virtual Environments and/or choosing different interpreters for Python that support the desired language: https://code.visualstudio.com/docs/python/python-tutorial
Happy coding!
Videos
Hi, i ve got maybe a dumb question, but i can t find any informations how to upgrade my python version, besides the Indian guys trying to explain how to change the interpret in Vscode.
I ve got Linux mint and python 3.10. I want to use python 3.12 in Vscode. But Vscode doesn't offer me 3.12. sudo apt-get upgrade didn't help. I want to use 3.12 in a new venv, but I have no clue how to get it. A link or an explanation for dummies would be fine. Thx in advance!
I've been trying to switch my python version from 2.7.16 to 3.8.2 but it doesn't seem to work.
When I open the command palette I select the 3.8.2 option which is the global version. However, when I run this command, "python --version" it tells me I am using the 2.7.16 version. Is there a way to remedy this? I've tried reinstalling VSC and nothing helps. Even changing the Python>Terminal: Extensions in settings doesn't do anything.
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
For choosing interpreter, press ctrl + p and then type >Python: Select Interpreter (don't forget the > character! if it doesn't show up, make sure you have installed python extension on your vs code) and select one of the options. It will show you available interpreters (virtual environments + the global environment) to choose.
If you want to change version of python you are using, you must first create a virtual environment with desired version of python and then choose it as your interpreter. (I recommend to create it in .venv directory in the root directory of your project)
This answer will help you with that.
Open command pallete with F1 (on Windows) and type Python: Select Interpreter.