2025-05-02 12:47:23 +02:00
# Installation
2026-02-10 14:18:32 +00:00
This guide uses conda (via miniforge) to manage environments. If you prefer another environment manager (e.g. `uv`, `venv`), ensure you have Python >=3.10 and ffmpeg installed with the `libsvtav1` encoder, then skip ahead to [Install LeRobot](#step-3-install-lerobot-).
## Step 1: Install [`miniforge`](https://conda-forge.org/download/)
2025-10-19 19:19:21 +02:00
```bash
wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
```
2026-02-10 14:18:32 +00:00
## Step 2: Environment Setup
2025-05-02 12:47:23 +02:00
2025-10-19 19:19:21 +02:00
Create a virtual environment with Python 3.10, using conda:
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
```bash
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:
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
```bash
conda activate lerobot
```
2025-10-19 19:19:21 +02:00
When using `conda`, install `ffmpeg` in your environment:
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
```bash
conda install ffmpeg -c conda-forge
```
> [!TIP]
> 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:
2025-07-17 14:30:20 +02:00
>
> - _[On any platform]_ Explicitly install `ffmpeg 7.X` using:
>
> ```bash
> conda install ffmpeg=7.1.1 -c conda-forge
> ```
>
> - _[On Linux only]_ If you want to bring your own ffmpeg: Install [ffmpeg build dependencies](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#GettheDependencies) and [compile ffmpeg from source with libsvtav1](https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu#libsvtav1), and make sure you use the corresponding ffmpeg binary to your install with `which ffmpeg`.
2025-05-02 12:47:23 +02:00
2026-02-10 14:18:32 +00:00
## Step 3: Install LeRobot 🤗
2025-08-06 15:06:36 +02:00
### From Source
First, clone the repository and navigate into the directory:
```bash
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.
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
```bash
2025-06-05 17:48:43 +02:00
pip install -e .
2025-05-02 12:47:23 +02:00
```
2025-08-06 15:06:36 +02:00
### Installation from PyPI
**Core Library:**
Install the base package with:
```bash
pip install lerobot
```
_This installs only the default dependencies._
**Extra Features:**
To install additional functionality, use one of the following:
```bash
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/
2025-10-23 19:37:11 +02:00
> [!NOTE]
2025-11-10 11:51:52 +01:00
> For lerobot 0.4.0, if you want to install pi, you will have to do: `pip install "lerobot[pi]@git+https://github.com/huggingface/lerobot.git"`
2025-10-23 19:37:11 +02:00
2025-06-05 17:48:43 +02:00
### Troubleshooting
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
If you encounter build errors, you may need to install additional dependencies: `cmake`, `build-essential`, and `ffmpeg libs`.
To install these for linux run:
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
```bash
2025-12-03 15:45:56 +01:00
sudo apt-get install cmake build-essential python3-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev
2025-05-02 12:47:23 +02:00
```
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
For other systems, see: [Compiling PyAV](https://pyav.org/docs/develop/overview/installation.html#bring-your-own-ffmpeg)
2025-06-05 17:48:43 +02:00
## 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
2025-07-17 14:30:20 +02:00
2025-10-14 17:21:18 +02:00
Install environment packages: `aloha` ([gym-aloha](https://github.com/huggingface/gym-aloha)), or `pusht` ([gym-pusht](https://github.com/huggingface/gym-pusht))
2025-06-05 17:48:43 +02:00
Example:
2025-07-17 14:30:20 +02:00
2025-06-05 17:48:43 +02:00
```bash
pip install -e ".[aloha]" # or "[pusht]" for example
```
2025-05-02 12:47:23 +02:00
2025-06-05 17:48:43 +02:00
### Motor Control
2025-07-17 14:30:20 +02:00
2025-06-05 17:48:43 +02:00
For Koch v1.1 install the Dynamixel SDK, for SO100/SO101/Moss install the Feetech SDK.
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
```bash
2025-06-05 17:48:43 +02:00
pip install -e ".[feetech]" # or "[dynamixel]" for example
2025-05-02 12:47:23 +02:00
```
2025-06-05 17:48:43 +02:00
### Experiment Tracking
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
To use [Weights and Biases](https://docs.wandb.ai/quickstart) for experiment tracking, log in with
2025-07-17 14:30:20 +02:00
2025-05-02 12:47:23 +02:00
```bash
wandb login
```
2025-06-13 18:48:39 +02:00
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.