Installation¶
mjswan can be installed as a Python package (the primary workflow) or as an npm package for JavaScript/TypeScript projects.
-
Install via pip to quickly build and share interactive MuJoCo simulations
-
Install via npm for custom web applications with TypeScript support
-
Clone the repository for development and contributing
Docker / Cluster
Not supported.
Requirements¶
| Requirement | Version |
|---|---|
| Python | 3.10 – 3.12 (3.13+ not yet supported) |
| Platform | macOS (Apple Silicon) or Linux (x86-64) |
| Browser | Any modern browser with WebAssembly and WebGL |
| Node.js | 20+ (npm installation only) |
Python 3.13
A transitive dependency (labmaze, pulled in via MyoSuite) does not yet publish a Python 3.13 wheel. Until it does, mjswan requires Python ≤ 3.12.
Python Installation¶
Install extra dependency sets as needed:
pip install 'mjswan[dev]' # type checking, linting, test tools
pip install 'mjswan[examples]' # dependencies for the bundled examples
The examples extra pulls in MyoSuite, MuJoCo Playground, robot_descriptions, and related packages. It can take several minutes to install and requires Python ≤ 3.12.
JavaScript Installation¶
Or with yarn:
The npm package provides the compiled browser-side runtime. It is independent of the Python package and has no Python dependency.
GitHub Source¶
Clone the repository and install all dependencies with uv:
To run the bundled demo after cloning: