How can I try Pyodide in my browser?
Updated
You can try Pyodide directly in your browser through a REPL (read-eval-print loop) on pyodide.org — no installation, no local Python environment, and no server setup required. This is the fastest way to run Python code in the browser and confirm what Pyodide can do before committing to a hosted or self-hosted setup.
What the in-browser REPL gives you
Pyodide is a Python distribution for the browser and Node.js based on WebAssembly. It is a port of CPython to WebAssembly/Emscripten, so the REPL runs an actual CPython interpreter compiled for the browser rather than a JavaScript reimplementation of Python.
In the REPL you can:
- Execute Python code interactively and see results immediately.
- Install and run Python packages in the browser with
micropip. - Use many scientific and general-purpose packages that have been ported to Pyodide, including NumPy, pandas, SciPy, Matplotlib, scikit-learn, regex, PyYAML, and cryptography.
- Mix Python and JavaScript through Pyodide's foreign function interface, including error handling across the two languages and async/await.
- Access Web APIs from Python when running inside a browser.
Steps to try it
- Open the Pyodide site (pyodide.org) and go to the "Try Pyodide" section, which links to a REPL that runs directly in your browser.
- Wait for the runtime to load. The first load downloads the WebAssembly build, so it can take a moment on a slow connection.
- Type Python at the prompt and run it. For example, enter a simple expression or a short script and check the output.
- To use a package, load it with
micropipinside the REPL, then import it. Any pure Python package with a wheel available on PyPI is supported; many packages with C, C++, or Rust extensions have also been ported.
Expected result: your Python code executes in the browser tab and prints output in the REPL, with no files installed on your machine.
Common snags
- First load is slow. The WebAssembly runtime and any packages you load are fetched over the network, so the initial experience depends on your connection.
- Not every package works. Pure Python packages with a PyPI wheel are supported, and many extension packages have been ported, but a package that has not been built for Pyodide will not load. Check the Pyodide distribution before assuming a package is available.
- Browser memory limits apply. Large datasets or heavy computation may hit the tab's memory ceiling.
- The REPL is for experimentation. It is a quick way to validate behavior, not a deployment target. For production use you would host Pyodide yourself or use a hosted distribution.
Where to go next
- To use a hosted distribution of Pyodide, see the Getting started documentation.
- To host Pyodide yourself, download it from the releases page and serve it with a web server.
- To use Pyodide with a bundler, see the Working with Bundlers documentation.
- If you maintain a Python package, or want to add a package to the Pyodide distribution, see the pyodide-build documentation.
- To experiment with or contribute to the runtime itself, see Building from source.