Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Tutorial 1: In-Browser Execution with JupyterLite

Open In Colab Open In Kaggle

Tutorial 1: In-Browser Execution with JupyterLite

This book uses JupyterLite to run Python directly in your browser. No server, no installation required — everything runs via WebAssembly (WASM).

How to activate in-browser execution

Click the power button (⚡) at the top right of this page. After ~10 seconds of initialisation, all code cells become live and editable.

Try it: basic computation

Try it: NumPy in the browser

Try it: matplotlib in the browser

How JupyterLite is configured

In myst.yml, the setting project.jupyter.lite: true enables the in-browser kernel for all pages that have a kernelspec in their frontmatter:

project:
  jupyter:
    lite: true

Pages without kernelspec (like further_reading.md) show no power button — the JupyterLite kernel is only activated for pages that declare a kernelspec.

For students: running in Colab or Kaggle

Every tutorial page with executable code also has Colab and Kaggle badges at the top of its generated notebook. These are injected automatically by CI — you do not add them manually. See Day 3, Tutorial 2 for how this works.