Download python extension for visual studio code

Visual Studio Code is one of the best IDE for development purposes but when you install it, initially it does not have support for Python. It allows JavaScript and TypeScript – however for other programming languages we need to install some plugins for VS Code to support the particular language. When you save a file in VS Code with a particular file extension, it will automatically suggest some plugins to be installed.

Download python extension for visual studio code

So if you save a file with a .py extension for your Python code, VS Code will suggest a general plugin for that, but of course, there are other plugins apart from that one that can help to ease your work. This article lists some Visual Studio Code extensions which can be helpful in the fast and easy development of Python.

  1. Python
  2. Kite AutoComplete AI Code
  3. Python Preview
  4. Python Snippets
  5. AREPL for Python
  6. Better Comments
  7. Python Docstring Generator
  8. Python Indent
  9. Python Test Explorer
  10. Dash

1. Python

Download python extension for visual studio code

This is the essential VS Code extension for Python, developed by Microsoft itself. While creating a .py file, VS Code will itself suggest installing this extension. It provides features like analyzing code for potential errors, code formatting, debugging through a debug console, testing with the unit test, pytest, and nose test frameworks. Syntax checking, auto-completion, auto-activation, and switching between different environments are also done by this extension. Moreover, it supports Jupyter Notebooks and therefore is considered as the very basic and important Python extension.

2. Kite AutoComplete AI Code

Download python extension for visual studio code

Kite is an advancement in the direction of ease of writing code. It is based on AI which enables writing the code quickly in VS Code. When you call a function, Kite will show the arguments required to call it. If you hover on any symbol, it will show a summary regarding it. It provides quick auto-completion and shows only the right thing at a time. It can be used for different programming languages apart from Python such as JavaScript, Go, etc.

3. Python Preview

Download python extension for visual studio code

This extension is used to preview the Python code in VS Code editor. It is very simple to use and makes debugging easy and fast. It includes graphics and animations to make visualization interesting and easy to understand the status of our code. It brings a visual view to VS Code and is specifically for Python only. It helps to visualize and ensure that what you’re trying to build is actually getting build or not.

4. Python Snippets

Download python extension for visual studio code

Python Snippets extension is very useful for beginners who are new to this language. It contains built-in snippets for lists, strings, dictionaries, tuple, class, etc with at least one example of each of them. It avoids typing the code again and again by using its snippets directly. Thus, we can say this extension is beginner-friendly and saves a lot of time for Python developers.

5. AREPL for python

Download python extension for visual studio code

It provides code evaluation in real-time. As you start typing, the code will keep on running which helps to check if the code is right or not during the time of writing itself. If an error is found, it will be reflected in the editor instantly with logs. It can be configured accordingly to fit user experience from the settings. One doesn’t need to run the code, AREPL automatically evaluates it.

6. Better Comments

Download python extension for visual studio code

Better Comments as the name suggest helps to create comments that are easily understandable. You can easily distinguish between different types of comments like alerts, todos, queries, etc as they are colored differently in order to categorize them. However, you can also change the color setting of the comments. This extension can also be used for languages other than Python.

7. Python Docstring Generator

Download python extension for visual studio code

It makes it easy to document code in VS Code and follow standard formats. This extension generates docstring for the Python functions, and you can select from different types of docstring formats. This is supported for kwargs, args, errors, and decorators The generated docstring can be formatted as per the user requirement. It provides support for tabbed navigation i.e. when a docstring is generated, you can tab through it to add arguments.

8. Python Indent

Download python extension for visual studio code

This is a great tool for managing indentation in Python. It automatically gives an adequate number of space or tabs when you hit the enter button for the next line. It is one of the best Python extensions in VS Code that saves a lot of time consumed in fixing indentation errors. The main areas where it helps are between bracket pairs, extending comments, trimming whitespace lines, keyword indentation like if-elif-else, return, etc.

9. Python Test Explorer

Download python extension for visual studio code

The Python Test Explorer extension allows you to run your Python unittest or Pytest tests with the Test Explorer UI. It shows a Test Explorer in the Test view in VS Code’s sidebar with all the tests that are found. A failed test’s log is displayed when the test is selected in the explorer providing an excellent user interface and debugging capabilities.  

10.Dash

Download python extension for visual studio code

Dash is actually an API Documentation Browser and Code Snippet Manager for macOS. This is a very important extension when you need to refer to the official documentation of Python. If you need to get more information about Classes, Functions, or Types you highlight the code, then press ctrl + h to access the official documentation offline. The benefit of having your docs offline is that you don’t need to have internet access to start coding and looking up references which allows you to focus more on the coding part.


How do I install Python extensions in Visual Studio code?

Install Python and the Python extension# For a quick install, use Python from python.org and install the extension from the VS Code Marketplace. Once you have a version of Python installed, activate it using the Python: Select Interpreter command.

What is the extension for Python Visual Studio code?

Python Test Explorer for Visual Studio Code The Python Test Explorer extension allows you to run your Python unittest or Pytest tests with the Test Explorer UI. This small and handy tool will enable you to test your code from VS Code's comfort with an excellent user interface and debugging capabilities.

How do I download Python packages in Visual Studio code?

Install packages using the Python Environments window.
From the Python Environments window, select the default environment for new Python projects and choose the Packages tab. ... .
Install matplotlib by entering its name into the search field and then selecting the Run command: pip install matplotlib option..

How do I add Python to Visual Studio?

Download and run the latest Visual Studio installer for Windows. Python support is present in the release 15.2 and later. If you have Visual Studio installed already, open Visual Studio and run the installer by selecting Tools > Get Tools and Features.