LeRobot documentation

Installation

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

Installation

Environment Setup

Create a virtual environment with Python 3.10, using Miniconda

conda create -y -n lerobot python=3.10

Then activate your conda environment, you have to do this each time you open a shell to use lerobot:

conda activate lerobot

When using miniconda, install ffmpeg in your environment:

conda install ffmpeg -c conda-forge

This usually installs ffmpeg 7.X for your platform compiled with the libsvtav1 encoder. If libsvtav1 is not supported (check supported encoders with ffmpeg -encoders), you can:

  • [On any platform] Explicitly install ffmpeg 7.X using:
conda install ffmpeg=7.1.1 -c conda-forge

Install LeRobot 🤗

From Source

First, clone the repository and navigate into the directory:

git clone https://github.com/huggingface/lerobot.git
cd lerobot

Then, install the library in editable mode. This is useful if you plan to contribute to the code.

pip install -e .

Installation from PyPI

Core Library: Install the base package with:

pip install lerobot

This installs only the default dependencies.

Extra Features: To install additional functionality, use one of the following:

pip install 'lerobot[all]'          # All available features
pip install 'lerobot[aloha,pusht]'  # Specific features (Aloha & Pusht)
pip install 'lerobot[feetech]'      # Feetech motor support

Replace [...] with your desired features.

Available Tags: For a full list of optional dependencies, see: https://pypi.org/project/lerobot/

Troubleshooting

If you encounter build errors, you may need to install additional dependencies: cmake, build-essential, and ffmpeg libs. To install these for linux run:

sudo apt-get install cmake build-essential python-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev pkg-config

For other systems, see: Compiling PyAV

Optional dependencies

LeRobot provides optional extras for specific functionalities. Multiple extras can be combined (e.g., .[aloha,feetech]). For all available extras, refer to pyproject.toml.

Simulations

Install environment packages: aloha (gym-aloha), xarm (gym-xarm), or pusht (gym-pusht) Example:

pip install -e ".[aloha]" # or "[pusht]" for example

Motor Control

For Koch v1.1 install the Dynamixel SDK, for SO100/SO101/Moss install the Feetech SDK.

pip install -e ".[feetech]" # or "[dynamixel]" for example

Experiment Tracking

To use Weights and Biases for experiment tracking, log in with

wandb login

You can now assemble your robot if it’s not ready yet, look for your robot type on the left. Then follow the link below to use Lerobot with your robot.

< > Update on GitHub