Install#

IR-SIM supports Python 3.9+ on Linux, macOS, and Windows. You can use pip or conda for installation.

Instructions

Install IR-SIM using pip:

pip install ir-sim

This will install the package and core dependencies for the base environment.

conda is a system for package and environment management.

  1. Install conda.

2. Create a new conda environment,

conda create --name irsim_env
conda activate irsim_env

or activate an existing one

3. Install ir-sim in the virtual environment

pip install ir-sim

uv is an extremely fast Python package and project manager.

Install IR-SIM using uv:

uv pip install ir-sim

or use uv’s project management:

uv add ir-sim

We strongly recommend using a fresh virtual environment (uv or conda) when installing IR-SIM from source.

Perform the following steps to install IR-SIM from source:

  1. Clone the official IR-SIM git repository, or a newly minted fork of the IR-SIM repository.

git clone https://github.com/hanruihua/ir-sim.git
  1. Navigate to the top-level of the cloned directory.

cd ir-sim
  1. If you want to use IR-SIM with editable source code, run

pip install -e .

otherwise, run

pip install .

or for uv users, run

uv sync

Install with Additional Features#

Keyboard Control

IR-SIM supports keyboard control for interactive robot simulation. Install the keyboard control dependencies:

pip install ir-sim[keyboard]

This installs:

  • pynput - For keyboard and mouse input handling

  • tabulate - For formatted table output

Linting

IR-SIM uses Ruff for linting. To install the dependency-groups for linting locally, run

uv sync --group lint

This includes:

  • Ruff - Linting tool

  • ty - Type hinting tool

  • black - Code formatter

Testing

Install test dependencies using the test group (from pyproject.toml):

uv sync --group test

Run the tests:

uv run pytest

Generate coverage:

uv run pytest --cov . --cov-report=xml --cov-report=html

Type-check the codebase:

uvx ty check
Documentation

Install documentation dependencies using the docs group (from pyproject.toml):

uv sync --group docs

Build the docs locally (HTML):

cd docs
make html

The output will be available under docs/build/html (or docs/_build/html depending on your environment setup).

All Features

To install all optional dependencies and features:

pip install ir-sim[all]

This includes:

  • Keyboard control features (pynput, tabulate)

  • Enhanced video support (imageio[ffmpeg])

To install dependency-groups:

uv sync --all-groups

This includes:

  • lint group

  • test group

  • docs group