The Python interpreter is a programming language that can be used in Visual Studio Code. It comes in different versions with different features and capabilities. The default version usually comes with Python when you install it on your computer. However, you may have multiple versions installed on your device and you can choose between them if you need to change the interpreter.
In this article, we will explain how to change the Python interpreter in VS Code.
How to change the Python interpreter in VS Code on Windows or Linux
Changing the Python interpreter in VS Code is a simple process that can be completed in just a few steps.
This is how you do it:
- Press “Ctrl + Shift + P” to open the command palette. You can easily access VS Code commands and functions through the command palette.

- Start writing “
Python: Select Interpreter” and press Enter. It will open a list of Python interpreters available on your device if you have multiple versions installed. If the Python extension does not locate an interpreter, it displays a warning.
- Click the Python interpreter you want to use. VS Code will display the selected interpreter in the status bar at the bottom right of the screen. It serves as a shortcut for the “
Python: Select Interpreter”Command and displays when no interpreter is selected as well. You can also check if the correct version is being used by opening a Python file.
How to change the Python interpreter in VS Code on macOS
Changing the Python interpreter in VS Code on macOS is similar to changing it on Windows or Linux, as there is only one different step.
Simply follow these steps:
- Press “Cmd + Shift + P” to open the command palette.

- Start writing “
Python: Select Interpreter” and press Enter. It will open a list of Python interpreters available on your device if you have multiple versions installed. If the Python extension does not locate an interpreter, it displays a warning.
- Click the Python interpreter you want to use. VS Code will display the selected interpreter in the status bar at the bottom right of the screen. It serves as a shortcut for the “
Python: Select Interpreter”Command and is also displayed when no interpreter is selected. You can also check if the correct version is being used by opening a Python file.
If VS Code does not locate your interpreter automatically, you can specify an interpreter manually by creating a path.
This is what you should do:
- Press “Cmd + Shift + P” to open the command palette.

- Start writing “
Python: Select Interpreter” and press Enter.
- Select “Enter interpreter path…”.

- Enter the full path into the Python interpreter or select “Search…” and browse your file system to find the Python you need.
If you do not have the correct Python extension within your VS code, you must install it first.
- Go to “Extensions” on the left side of the screen. Once you type “Python”, the list of popular VS Code extensions on VS Code Marketplace will be revealed.

- Select the extension from the search results and click the “Install” button.

- Click “Code,” then “Preferences” and “Settings.”

- Start typing “Environment.”

- Under “Extensions,” look for “Python.”

- Make sure the box that says “Enable the Python environment in the terminal created using the extension” is unchecked.

If you do not have VS Code installed on your device, you can download it from official website.
Accomplish more with the right Python interpreter
Learning how to change the Python interpreter will allow you to switch between your installed Python versions, use virtual environments to manage your Python dependencies, use a specific Python distribution, and more. By following the steps outlined in this article, you will learn how to easily switch between different Python interpreters to suit your needs.
Have you already tried changing the Python interpreter in VS Code? Did you use any of the tips outlined in this article? Tell us in the comments section below.