CLI Reference#
All commands are accessed through the pyodide CLI, provided by the pyodide-cli package (installed automatically with pyodide-build).
pyodide build#
Build a Python package for WebAssembly.
pyodide build [OPTIONS] [SOURCE_LOCATION]
Arguments:
Argument |
Description |
|---|---|
|
Build source: a directory. Defaults to the current directory. |
Options:
Option |
Default |
Description |
|---|---|---|
|
|
Output directory for the built wheel |
|
|
Symbol export mode: |
|
Pass settings to the build backend (same as |
|
|
|
Disable build isolation; build deps must be installed manually |
|
|
Skip build dependency check (only with |
|
|
Zip compression level for the wheel |
|
platform cache |
Path to the cross-build environment, inferred from platform cache if not specified |
pyodide venv#
Create a Pyodide virtual environment for testing.
pyodide venv [OPTIONS] DEST
Arguments:
Argument |
Description |
|---|---|
|
Directory to create the virtualenv at |
Options:
Option |
Default |
Description |
|---|---|---|
|
|
Remove destination directory if it exists |
|
Don’t create VCS ignore directive (e.g., |
|
|
Enable/disable download of latest pip/setuptools from PyPI |
|
|
Path containing additional wheels |
|
|
|
pip version: |
|
setuptools version: |
|
|
Do not install setuptools |
pyodide config#
Query build configuration values.
pyodide config list#
pyodide config list
Lists all config variables and their current values.
pyodide config get#
pyodide config get CONFIG_VAR
Get a single config variable’s value. Common variables:
Variable |
Description |
|---|---|
|
C compiler flags |
|
C++ compiler flags |
|
Linker flags |
|
Rust compiler flags |
|
Path to CMake toolchain file |
|
Path to Meson cross file |
|
Required Rust nightly toolchain |
|
Required Emscripten version |
|
Target Python version |
|
Cross-build environment path |
|
Pyodide ABI version |
pyodide xbuildenv#
Manage the cross-build environment.
pyodide xbuildenv install#
pyodide xbuildenv install [OPTIONS] [VERSION]
Option |
Env var |
Description |
|---|---|---|
|
|
Destination directory |
|
Download from a custom URL |
|
|
Force install even if version is incompatible |
pyodide xbuildenv version#
pyodide xbuildenv version [--path PATH]
Print the current active version.
pyodide xbuildenv versions#
pyodide xbuildenv versions [--path PATH]
List all installed versions. Active version is marked with *.
pyodide xbuildenv use#
pyodide xbuildenv use VERSION [--path PATH]
Switch to a specific installed version.
pyodide xbuildenv uninstall#
pyodide xbuildenv uninstall [VERSION] [--path PATH]
Uninstall a version. Defaults to the current version if not specified.
pyodide xbuildenv search#
pyodide xbuildenv search [OPTIONS]
Option |
Description |
|---|---|
|
Custom metadata file URL or path |
|
Show all versions, including incompatible ones |
|
Output as JSON |