Installation
Positron recommended; VS Code with extensions as an alternative
Python
Already have Python? Keep the Python installation you normally use and continue to Choose an editor. You do not need to reinstall Python or create a special environment for this session.
Install Python only if you do not have it
Download Python from python.org. Use a stable release, not a pre-release.
macOS: Download the macOS installer (.pkg), open it, and follow the installation steps. Afterwards, open the new Python folder in Applications and double-click Install Certificates.command.
Windows: Download and install the Python Install Manager. Open PowerShell, then run:
py install defaultThis installs the default stable Python release. These steps are only for a new installation; leave an existing working Python setup alone.
Close and reopen your editor and terminal after installation. To check Python, run the command for your computer in a terminal:
| Computer | Command |
|---|---|
| macOS | python3 --version |
| Windows | py --version |
The result should begin with Python 3. Continue below to select that installation in your editor and add the required packages.
Choose an editor
We recommend Positron for writing Quarto documents. You can also use VS Code with the Quarto, Python, and Jupyter extensions. Choose one editor; you do not need both.
| Editor | Install from |
|---|---|
| Positron — recommended | Positron downloads |
| VS Code — alternative | VS Code downloads |
Positron (recommended)
Install Positron, then open it. Use the Interpreter picker at the top right to select the Python installation you normally use, or the one you just installed. If no Python session is running, choose New Console Session… and select Python.
Positron includes Quarto, the Quarto extension, and Python editing and interactive execution. No separate editor extensions are needed for this session. You still need the Python packages and TinyTeX described below.
VS Code (alternative)
You can do the same work in VS Code. Install VS Code, if needed, and the Quarto program. In VS Code’s Extensions panel, install:
| Extension | Identifier |
|---|---|
| Quarto | quarto.quarto |
| Python — Microsoft | ms-python.python |
| Jupyter — Microsoft | ms-toolsai.jupyter |
Restart VS Code after installation. Use Python: Select Interpreter in the Command Palette to select the Python installation you normally use, or the one you just installed.
The Quarto program and its VS Code extension are separate installations. These VS Code extension steps are not needed in Positron.
Check the Quarto command
Open Terminal → New Terminal in Positron/VS Code and run:
quarto --versionIf the terminal cannot find quarto, install the standalone Quarto program and restart your editor. Positron’s built-in Quarto support does not necessarily make the command available in every terminal.
Install the Python packages
Use the terminal, not a Python cell. Install the packages into the same Python installation you selected in Positron/VS Code.
macOS:
python3 -m pip install jupyter pandas matplotlib tabulateWindows:
py -m pip install jupyter pandas matplotlib tabulateIf you normally start your chosen Python with python instead, use:
python -m pip install jupyter pandas matplotlib tabulateRun one of these commands, using the command that starts your chosen Python. jupyter executes Python during rendering; pandas, matplotlib, and tabulate support the template’s data, graph, and table code.
Selecting Python in the editor does not necessarily change which Python a terminal command uses. The check below shows the Python installation Quarto finds for rendering.
Install TinyTeX for PDFs
In the terminal:
quarto install tinytexSkip this if you already have a working LaTeX installation. Installation and the first PDF render may need an internet connection to download packages.
Check the document
quarto check jupyterCheck that the Python path shown matches the installation you intend to use.
Download the document template. Save it in an ordinary working folder, outside this teaching website. Open that folder in Positron/VS Code, then open a new terminal there and run:
quarto render document-template.qmd --to html
quarto render document-template.qmd --to pdfOpen the resulting HTML and PDF files. If a package is missing, install it into the Python installation shown by quarto check jupyter.
Continue to Workflow.