Skip to content

Installation

Requirements

  • Python 3.11+ for the CLI.
  • A browser with WebAssembly support. Chromium has been tested; Firefox/WebKit still need a dedicated compatibility suite.
  • Internet access for the first default runtime download, or a local Pyodide runtime for an offline build.
  • Node.js 22+ only for SSR or rebuilding the framework's JS bundles. Ordinary app users do not need Node to use the packaged browser renderer.

Create a virtual environment

python -m venv .venv
.venv\Scripts\Activate.ps1
source .venv/bin/activate

If activation is unavailable, invoke .venv\Scripts\python.exe on Windows or .venv/bin/python on Unix directly with -m pip or -m pyreact_forge.cli.

Install the package

Before the first public release, install from the supplied source directory:

python -m pip install .

Or install its wheel, using the real path to the file:

python -m pip install ./pyreact_forge-0.1.0a1-py3-none-any.whl

After the maintainer publishes the release on PyPI:

python -m pip install "pyreact-forge==0.1.0a1"

The explicit version selects the prerelease. pip install --pre pyreact-forge can select newer prereleases when you intentionally want them. The distribution name is pyreact-forge; the Python import is pyreact_forge.

Verify installation

python -c "import pyreact_forge; print(pyreact_forge.__version__)"
pyreact-forge --help

Expected package version: 0.1.0a1. If the command is not on PATH, use:

python -m pyreact_forge.cli --help

Start an app

pyreact-forge init my-app
cd my-app
pyreact-forge dev

Open the printed address, normally http://127.0.0.1:5173. Initialization requires a new/empty directory and does not overwrite a non-empty project.

Offline runtime

pyreact-forge vendor
pyreact-forge dev --offline

vendor downloads the pinned runtime once to the user's cache. You can instead set PYREACT_FORGE_PYODIDE to an existing directory containing pyodide.mjs, pyodide.js, pyodide.asm.mjs, pyodide.asm.wasm, python_stdlib.zip and pyodide-lock.json. Optional Python packages can still introduce downloads.

See troubleshooting for missing commands, runtime download failures and browser errors.