Setup
Please complete these steps before the tutorial begins. If you run into trouble, find us before the session starts or post in the workshop chat.
Please make sure you are using a version of Python BELOW 3.15
Any of Python 3.11.x, 3.12.x, 3.13.x, 3.14.x will be fine.
Check the GitHub Actions of the install tests on different python versions here: https://github.com/chendaniely/pycon-2026-shiny/actions/workflows/test-install.yml
Python Environment
Pick one of the following methods — they all produce the same result.
Here are the packages you’ll be installing:
requirements.txt
# core code examples
palmerpenguins
plotnine
shiny
# website rendering
ipykernel
jupyter
shinylive
# mybinder
jupyter-server-proxy
# AI slides (07-08)
anthropic
chatlas
openai
python-dotenv
querychat
shinychat
# extended Shiny UI
faicons
shinywidgets
# data & visualization
altair
pandas
plotly
ridgeplot
seaborn
# testing
playwright
pytest
pytest-playwright
python -m venv .venv
# macOS / Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activate
pip install -r requirements.txtconda create -n pycon2026 python=3.12
conda activate pycon2026
pip install -r requirements.txtuv venv .venv
# macOS / Linux
source .venv/bin/activate
# Windows
.venv\Scripts\activate
uv pip install -r requirements.txtpixi init .
pixi add python==3.12 pip
pixi run python -m pip install -r requirements.txt
pixi shellPlaywright Browser
Shiny app testing uses Playwright to drive a real browser. After installing the Python packages, install the Chromium browser that Playwright will use:
playwright install chromiumThis downloads a Playwright-managed copy of Chromium (about 150 MB) — it won’t touch any browser you already have installed.
IDE
We recommend Positron, this is what the workshop will be using. VS Code works just as well.
Whichever you choose, install the Shiny extension (it works in both).
We will not be using Jupyter Notebooks during this workshop.
Run in the Cloud
No local install needed — see the Cloud page for GitHub Codespaces, MyBinder, and Posit Cloud instructions.
It’s best to do a local installation of everything you need. The cloud experience will be slow, and some things may not work.
This is really provided as a backup.
AI / Chat Model
GitHub Models (free, recommended)
You’ll need a GitHub Personal Access Token (PAT). It doesn’t require any special scopes.
- Create a classic PAT following GitHub’s instructions
- Set the token as an environment variable:
export GITHUB_TOKEN=your_token_here # macOS / Linux
$env:GITHUB_TOKEN="your_token_here" # Windows PowerShellLocal LLM via Ollama (optional, no account needed)
- Download and install Ollama
- Pull a model that fits your machine:
| Model | Download Size | Install Command |
|---|---|---|
| qwen3:0.6b | 523 MB | ollama run qwen3:0.6b |
| phi4-mini-reasoning | 3.2 GB | ollama run phi4-mini-reasoning |
| qwen3 | 5.2 GB | ollama run qwen3 |
| devstral | 14 GB | ollama run devstral |
Paid API (optional)
Consumer subscriptions (Claude.ai, ChatGPT Plus, etc.) and API access are billed separately.
- Sign up at https://console.anthropic.com
- Add credits
- Create an API key at https://console.anthropic.com/settings/keys
export ANTHROPIC_API_KEY=your_key_here- Sign up at https://openai.com/
- Create an API key at https://platform.openai.com/api-keys
export OPENAI_API_KEY=your_key_here- Sign in at https://aistudio.google.com
- Click Create API key
export GOOGLE_API_KEY=your_key_hereVerify Your Installation
- Clone or download this repository: https://github.com/chendaniely/pycon-2026-shiny
- Activate your Python environment
Step 1 — check that all packages import correctly:
python test-install.pyYou should see a ✓ next to every package and a final All good! message.
Step 2 — check that Shiny is working:
shiny run test-install.pyYou should see:
INFO: Started server process [...]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Open http://127.0.0.1:8000 in your browser and confirm the page loads.