Install the Python Extension

This page explains how to install the Python extension. For an overview of what it is and what it adds, see the Python extension concept page.

This procedure walks you through installing the Python extension in Visual Studio Code.


🧰 Prerequisites

Install both before continuing. The steps below assume they are already set up.

📋 Steps

  1. Open Visual Studio Code.

  2. Open the Extensions panel by clicking the extensions icon in the left sidebar. It looks like four squares.

  3. In the search box, type Python.

  4. Find the extension named Python published by Microsoft, and click Install.

  5. Wait for the installation to finish. If VS Code shows a Reload prompt, click it.

🎯 Expected Outcome

In the Extensions panel, the Python extension shows as Installed with no errors.

⚠️ Mistakes

Installing the wrong extension

Searching for Python returns many results. The one to install is named exactly Python and published by Microsoft. Check the publisher before clicking Install, as other results add unrelated tools and will not give the Python support you need.

Installing the extension but not Python

The extension installs cleanly and the editor looks healthy, but nothing will run without Python. If the extension later reports that no interpreter is available, Python is missing. Install it from python.org (external link), and on Windows make sure the Add Python to PATH box is checked during installation, then restart VS Code.

Expecting it to work the instant it installs

After installing, VS Code takes a moment to finish loading the extension. If autocomplete or error detection is not working right away, wait a moment and check the status bar at the bottom of the window for loading indicators before assuming something is wrong.

📚 Resources