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
Open VS Code in your desired folder and create a new file with the .qmd extension (or open an existing file).
Render the document (from the menus, or use the keyboard shortcut: :kbd:`Ctrl+Shift+K`)
For more details, visit the official Quarto tutorial.
Troubleshooting
Verify that VS Code is using the intended Python.
Check Python version in PowerShell:
python --version
If needed (probably not), update settings.json:
{ "python.defaultInterpreterPath": "mypath\\to\\python" }
This can be set at the user, workspace, or folder level.