- Notifications
You must be signed in to change notification settings - Fork0
Python extension for Visual Studio Code.
License
optilogic/vscode-python
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
AVisual Studio Codeextension with rich support for thePython language (for allactively supported versions of the language: >=3.7), including features such as IntelliSense (Pylance), linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more!
Support forvscode.dev
The Python extension does offersome support when running onvscode.dev (which includesgithub.dev). This includes partial IntelliSense for open files in the editor.
The Python extension will automatically install thePylance,Jupyter andisort extensions to give you the best experience when working with Python files and Jupyter notebooks. However, Pylance is an optional dependency, meaning the Python extension will remain fully functional if it fails to be installed. You can alsouninstall it at the expense of some features if you’re using a different language server.
Extensions installed through the marketplace are subject to theMarketplace Terms of Use.
- Step 1.Install a supported version of Python on your system (note: that the system install of Python on macOS is not supported).
- Step 2.Install the Python extension for Visual Studio Code.
- Step 3. Open or create a Python file and start coding!
Select your Python interpreter by clicking on the status bar
Configure the debugger through the Debug Activity Bar
Configure tests by running the
Configure Tests
command
The Python extension and theJupyter extension work together to give you a great Notebook experience in VS Code.
For more information you can:
- Follow our Python tutorial with step-by-step instructions for building a simple app.
- Check out thePython documentation on the VS Code site for general information about using the extension.
- Check out theJupyter Notebook documentation on the VS Code site for information about using Jupyter Notebooks in VS Code.
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 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 selectingRun Python File in Terminal . |
Python: Select Linter | Switch from Pylint to Flake8 or other supported linters. |
Format Document | Formats code using the providedformatter in thesettings.json file. |
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 typePython
. For Jupyter extension commands, just typeJupyter
.
Learn more about the rich features of the Python extension:
IntelliSense: Edit your code with auto-completion, code navigation, syntax checking and more
Linting: Get additional code analysis with Pylint, Flake8 and more
Code formatting: Format your code with black, autopep or yapf
Debugging: Debug your Python scripts, web apps, remote or multi-threaded processes
Testing: Run and debug tests through the Test Explorer with unittest or pytest.
Jupyter Notebooks: Create and edit Jupyter Notebooks, add and run code cells, render plots, visualize variables through the variable explorer, visualize dataframes with the data viewer, and more
Environments: Automatically activate and switch between virtualenv, venv, pipenv, conda and pyenv environments
Refactoring: Restructure your Python code with variable extraction, method extraction and import sorting
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
- If you have a question about how to accomplish something with the extension, pleaseask on Stack Overflow
- If you come across a problem with the extension, pleasefile an issue
- Contributions are always welcome! Please see ourcontributing guide for more details
- Any and all feedback is appreciated and welcome!
- If someone has alreadyfiled an issue that encompasses your feedback, please leave a 👍/👎 reaction on the issue
- Otherwise please start anew discussion
- If you're interested in the development of the extension, you can read about ourdevelopment process
The Microsoft Python Extension for Visual Studio Code collects usagedata and sends it to Microsoft to help improve our products andservices. Read ourprivacy statement tolearn more. This extension respects thetelemetry.enableTelemetry
setting which you can learn more about athttps://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting.
About
Python extension for Visual Studio Code.
Resources
License
Code of conduct
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Languages
- TypeScript66.7%
- Python32.8%
- JavaScript0.4%
- Jupyter Notebook0.1%
- HTML0.0%
- Roff0.0%