Setting Up Quarto with VS Code and Python on Win 11

Prerequisite

Windows 11 operating system

We will rely heavily on the winget utility, run from PowerShell (as administrator).

Required Software with Brief Installation Instructions

Python

winget install Python

Visual Studio Code

winget install Microsoft.VisualStudioCode

Quarto

winget install Quarto

Python packages:

python -m pip install -U jupyter matplotlib plotly

Quarto VS Code Extension

Open VS Code and install three extensions from the Visual Studio Marketplace: Python, Jupyter, and Quarto.

Create a Quarto document

  1. Open VS Code in your desired folder and create a new file with the .qmd extension (or open an existing file).

  2. Render the document (from the menus, or use the keyboard shortcut: :kbd:`Ctrl+Shift+K`)

  3. For more details, visit the official Quarto tutorial.

Troubleshooting

Verify that VS Code is using the intended Python.

  1. Check Python version in PowerShell:

    python --version

  2. If needed (probably not), update settings.json:

    {
      "python.defaultInterpreterPath": "mypath\\to\\python"
    }

This can be set at the user, workspace, or folder level.