Python Programming from First Principles: Learn to Code, Think Computationally, and Solve Real-World Problems
PDFEPUB
CHAPTER GUIDE · GETTING STARTED

VS Code

On this pageDownload and installInstall Python support

Visual Studio Code (VS Code) is the editor used here to write and run saved Python files. Python should already be installed using the guide for your operating system.

Download and install

  1. Open the official VS Code download page and choose the build for your operating system and processor.1
  2. Complete the installation for your platform:
    • Windows: run the User Installer (.exe), accept the licence if you agree, and complete the setup screens.
    • macOS: open the downloaded disk image (.dmg), drag Visual Studio Code into Applications, then open it there.
    • Linux: download the package appropriate to the distribution (.deb for Debian/Ubuntu or .rpm for RPM-based systems) and open it with the system’s software installer. If the distribution uses a different method, follow its official setup instructions.
  3. Open VS Code. The welcome screen confirms that the editor is installed. Optional AI features and account sign-in are not needed for the examples in this chapter.

Install Python support

An extension adds features to the editor. Microsoft’s Python extension supplies the controls used to select Python and run a file; it does not install Python itself.

  1. Select Extensions in the left activity bar, or press Ctrl+Shift+X on Windows/Linux or Command+Shift+X on macOS.
  2. Type Python in the search field.
  3. Select the extension named Python published by Microsoft, as shown in Figure 6. Choose Install and wait for installation to finish.2
  4. If VS Code requests a reload, complete it. A Disable or Uninstall control indicates that the extension is already installed.
Official VS Code screenshot showing a search for Python and the Python extension published by Microsoft.
Figure 6 — Identify Microsoft’s Python extension in Extensions. The official screenshot shows an installed extension; a new installation initially shows Install. Version numbers and other search results may differ.

The editor and Python support are now available. Opening a project folder gives the files a common location and lets the editor remember which Python installation to use.


  1. Microsoft, Download VS Code and installation instructions for Windows, macOS and Linux. Checked on 22 October 2026.↩︎

  2. Microsoft, Extension Marketplace. Source of the Python extension screenshot.↩︎