Python extension for Visual Studio Code
4,634
stars
6,886
commits
TypeScript
primary language
Sep 10, 2026
updated
A Visual Studio Code extension with rich support for the Python language (for all actively supported Python versions), providing access points for extensions to seamlessly integrate and offer support for IntelliSense (Pylance), debugging (Python Debugger), formatting, linting, code navigation, refactoring, variable explorer, test explorer, environment management (NEW Python Environments Extension).
The Python extension does offer some support when running on vscode.dev (which includes github.dev). This includes partial IntelliSense for open files in the editor.
The Python extension will automatically install the following extensions by default to provide the best Python development experience in VS Code:
These extensions are optional dependencies, meaning the Python extension will remain fully functional if they fail to be installed. Any or all of these extensions can be disabled or uninstalled at the expense of some features. Extensions installed through the marketplace are subject to the Marketplace Terms of Use.
You may now see that the Python Environments Extension is installed for you, but it may or may not be "enabled" in your VS Code experience. Enablement is controlled by the setting "python.useEnvironmentsExtension": true (or false).
true, you will manually opt in to using the Python Environments Extension for environment management.The Python Environments Extension is still under active development and experimentation. Its goal is to provide a dedicated view and improved workflows for creating, deleting, and switching between Python environments, as well as managing packages. If you have feedback, please let us know via issues.
The Python extension provides pluggable access points for extensions that extend various feature areas to further improve your Python development experience. These extensions are all optional and depend on your project configuration and preferences.
If you encounter issues with any of the listed extensions, please file an issue in its corresponding repo.
Select your Python interpreter by clicking on the status bar
<img src=https://raw.githubusercontent.com/microsoft/vscode-python/main/images/InterpreterSelectionZoom.gif width=280 height=100>
Configure the debugger through the Debug Activity Bar
<img src=https://raw.githubusercontent.com/microsoft/vscode-python/main/images/ConfigureDebugger.gif width=734 height=413>
Configure tests by running the Configure Tests command
<img src=https://raw.githubusercontent.com/microsoft/vscode-python/main/images/ConfigureTests.gif width=734 height=413>
The Python extension offers support for Jupyter notebooks via the Jupyter extension to provide you a great Python notebook experience in VS Code.
Install the Jupyter extension.
Open or create a Jupyter Notebook file (.ipynb) and start coding in our Notebook Editor!
<img src=https://raw.githubusercontent.com/microsoft/vscode-python/main/images/OpenOrCreateNotebook.gif width=1029 height=602>
For more information you can:
Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:
| Command | Description |
|---|---|
Python: Select Interpreter | Switch between Python interpreters, versions, and environments. |
Python: Start Terminal REPL | Start an interactive Python REPL using the selected interpreter in the VS Code terminal. |
Python: Run Python File in Terminal | Runs the active Python file in the VS Code terminal. You can also run a Python file by right-clicking on the file and selecting Run Python File in Terminal. |
Python: Configure Tests | Select a test framework and configure it to display the Test Explorer. |
To see all available Python commands, open the Command Palette and type Python. For Jupyter extension commands, just type Jupyter.
Learn more about the rich features of the Python extension:
The extension is available in multiple languages: de, en, es, fa, fr, it, ja, ko-kr, nl, pl, pt-br, ru, tr, zh-cn, zh-tw
The Microsoft Python Extension for Visual Studio Code collects usage
data and sends it to Microsoft to help improve our products and
services. Read our
privacy statement to
learn more. This extension respects the telemetry.telemetryLevel
setting which you can learn more about at
https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.
(top 30 of 337)
TypeScript
68.0%
Python
31.3%
Python extension for Visual Studio Code
4,634
stars
6,886
commits
TypeScript
primary language
Sep 10, 2026
updated
A Visual Studio Code extension with rich support for the Python language (for all actively supported Python versions), providing access points for extensions to seamlessly integrate and offer support for IntelliSense (Pylance), debugging (Python Debugger), formatting, linting, code navigation, refactoring, variable explorer, test explorer, environment management (NEW Python Environments Extension).
The Python extension does offer some support when running on vscode.dev (which includes github.dev). This includes partial IntelliSense for open files in the editor.
The Python extension will automatically install the following extensions by default to provide the best Python development experience in VS Code:
These extensions are optional dependencies, meaning the Python extension will remain fully functional if they fail to be installed. Any or all of these extensions can be disabled or uninstalled at the expense of some features. Extensions installed through the marketplace are subject to the Marketplace Terms of Use.
You may now see that the Python Environments Extension is installed for you, but it may or may not be "enabled" in your VS Code experience. Enablement is controlled by the setting "python.useEnvironmentsExtension": true (or false).
true, you will manually opt in to using the Python Environments Extension for environment management.The Python Environments Extension is still under active development and experimentation. Its goal is to provide a dedicated view and improved workflows for creating, deleting, and switching between Python environments, as well as managing packages. If you have feedback, please let us know via issues.
The Python extension provides pluggable access points for extensions that extend various feature areas to further improve your Python development experience. These extensions are all optional and depend on your project configuration and preferences.
If you encounter issues with any of the listed extensions, please file an issue in its corresponding repo.
Select your Python interpreter by clicking on the status bar
<img src=https://raw.githubusercontent.com/microsoft/vscode-python/main/images/InterpreterSelectionZoom.gif width=280 height=100>
Configure the debugger through the Debug Activity Bar
<img src=https://raw.githubusercontent.com/microsoft/vscode-python/main/images/ConfigureDebugger.gif width=734 height=413>
Configure tests by running the Configure Tests command
<img src=https://raw.githubusercontent.com/microsoft/vscode-python/main/images/ConfigureTests.gif width=734 height=413>
The Python extension offers support for Jupyter notebooks via the Jupyter extension to provide you a great Python notebook experience in VS Code.
Install the Jupyter extension.
Open or create a Jupyter Notebook file (.ipynb) and start coding in our Notebook Editor!
<img src=https://raw.githubusercontent.com/microsoft/vscode-python/main/images/OpenOrCreateNotebook.gif width=1029 height=602>
For more information you can:
Open the Command Palette (Command+Shift+P on macOS and Ctrl+Shift+P on Windows/Linux) and type in one of the following commands:
| Command | Description |
|---|---|
Python: Select Interpreter | Switch between Python interpreters, versions, and environments. |
Python: Start Terminal REPL | Start an interactive Python REPL using the selected interpreter in the VS Code terminal. |
Python: Run Python File in Terminal | Runs the active Python file in the VS Code terminal. You can also run a Python file by right-clicking on the file and selecting Run Python File in Terminal. |
Python: Configure Tests | Select a test framework and configure it to display the Test Explorer. |
To see all available Python commands, open the Command Palette and type Python. For Jupyter extension commands, just type Jupyter.
Learn more about the rich features of the Python extension:
The extension is available in multiple languages: de, en, es, fa, fr, it, ja, ko-kr, nl, pl, pt-br, ru, tr, zh-cn, zh-tw
The Microsoft Python Extension for Visual Studio Code collects usage
data and sends it to Microsoft to help improve our products and
services. Read our
privacy statement to
learn more. This extension respects the telemetry.telemetryLevel
setting which you can learn more about at
https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.
(top 30 of 337)
TypeScript
68.0%
Python
31.3%