Skip to content

Installation

Select your installation method from the tabs below, then read the notes under each section for what it includes.

pip install crazyflow
pip install "crazyflow[gpu]"
git clone https://github.com/learnsyslab/crazyflow.git
cd crazyflow
pixi shell
git clone https://github.com/learnsyslab/crazyflow.git
cd crazyflow
pixi shell -e tests
git clone https://github.com/learnsyslab/crazyflow.git
cd crazyflow
uv sync                 # core + dev tooling (tests, docs, ruff)
uv run python -c "from crazyflow.sim import Sim; Sim().reset()"

GPU support

JAX defaults to CPU-only execution. The gpu extra swaps in jax[cuda12], enabling GPU execution. Setting device="gpu" in the Sim constructor then routes all computation through CUDA.

Note

GPU support is only available on Linux x86-64.

Developer install

Pixi creates a fully reproducible environment (locked via pixi.lock). This variant installs crazyflow in editable mode. Any source change takes effect immediately without reinstalling. Recommended for contributors and researchers who modify the simulator.

uv is supported as an alternative. uv sync creates a .venv with crazyflow installed editable plus the dev dependency group (tests, docs, ruff). The dependency groups (tests, docs, dist, dev) mirror the pixi features and are defined under [dependency-groups] in pyproject.toml. The uv lockfile is not committed — pixi.lock remains the canonical reproducible environment.

uv sync                 # core + dev group (default)
uv sync --group docs    # only the docs group + core
uv sync --no-default-groups --extra gpu   # core + GPU extra, no dev tooling

Testing

Adds pytest and pytest-markdown-docs for running the test suite and doc snippet tests.

pixi run tests          # unit and integration tests
pixi run test-docs      # doc code snippet tests
uv run pytest -v tests  # unit and integration tests
uv run pytest -v --markdown-docs --markdown-docs-syntax=superfences crazyflow/ docs/ --ignore=docs/gen_ref_pages.py

Verify the installation

python -c "from crazyflow.sim import Sim; sim = Sim(); sim.reset(); print('OK')"