Downloading and deploying Pyodide#
Pyodide is available from the JsDelivr CDN
Recommended, cached by the browser
Re-deployed for each commit on main, no browser caching, should only be used for testing
For a given version, several build variants are also available,
<version>/full/: the default full build
<version>/debug/: build with unminified
pyodide.asm.jsuseful for debugging
You can also download Pyodide packages from GitHub
releases. The full distribution
including all vendored packages is available as
The full distribution is quite large (200+ megabytes). The minimal set of files
needed to start Pyodide is included as
pyodide-core-0.24.0.tar.bz2. It is
intended for use with node which will automatically install missing packages
from the cdn – it is the same set of files that are installed if you use
npm install pyodide. It may also be convenient for other purposes.
You will need to serve these files yourself.
Serving Pyodide packages#
With Python 3.7.5+ you can serve Pyodide files locally with
python -m http.server
from the Pyodide distribution folder. Navigate to http://localhost:8000/console.html and the Pyodide repl should load.
Any service that hosts static files and that correctly sets the WASM MIME type and CORS headers will work. For instance, you can use GitHub Pages or similar services.
For additional suggestions for optimizing the size and load time for Pyodide, see the Emscripten documentation about deployments.