Skip to main content

Quick Installation

LeRobot can be installed directly from PyPI:
pip install lerobot
Verify your installation:
lerobot-info
LeRobot requires Python 3.12 or higher. Make sure you have a compatible Python version installed.

System Requirements

Python Version

  • Required: Python >= 3.12
  • Supported: Python 3.12, 3.13

Operating Systems

  • Linux: Full support (recommended for production)
  • macOS: Full support with Apple Silicon (MPS) acceleration
  • Windows: Partial support (some features may have limitations)

Hardware

  • GPU: CUDA-capable GPU recommended (NVIDIA)
  • RAM: Minimum 16GB, 32GB+ recommended for large datasets
  • Storage: Varies by dataset size (streaming mode available for large datasets)

Installation Options

Basic Installation

For general use without robot hardware:
pip install lerobot
This installs core dependencies:
  • PyTorch (version 2.2.1 or higher, below 2.11.0)
  • Hugging Face libraries (datasets, diffusers, huggingface-hub, accelerate)
  • Computer vision libraries (opencv-python-headless, torchvision, av)
  • Training tools (wandb, gymnasium, rerun-sdk)

Installation with Specific Hardware

LeRobot provides optional dependencies for specific robot hardware:
pip install lerobot[dynamixel]

Installation for Specific Robots

pip install lerobot[damiao]

Installation for Specific Policies

Install dependencies for specific policy implementations:
pip install lerobot[pi]

Installation for Simulation Environments

pip install lerobot[aloha]

Full Installation

For developers who want all features:
pip install lerobot[all]
The [all] installation includes most optional dependencies and can take significant time and disk space. Some packages like groot and unitree_g1 require manual installation steps and are excluded.

Development Installation

For contributors and developers:
# Clone the repository
git clone https://github.com/huggingface/lerobot.git
cd lerobot

# Install in editable mode with development tools
pip install -e .[dev]

# Set up pre-commit hooks
pre-commit install
Development dependencies include:
  • pre-commit: Code quality checks
  • debugpy: Python debugging
  • pytest: Testing framework
  • mypy: Type checking

Verifying Installation

Check Version

import lerobot
print(lerobot.__version__)

List Available Resources

import lerobot
from pprint import pprint

# Available environments
print("Environments:", lerobot.available_envs)

# Available policies
print("Policies:", lerobot.available_policies)

# Available robots
print("Robots:", lerobot.available_robots)

# Available cameras
print("Cameras:", lerobot.available_cameras)

# Available motors
print("Motors:", lerobot.available_motors)

# Available datasets
print(f"Total datasets: {len(lerobot.available_datasets)}")

Test GPU Availability

import torch

print(f"PyTorch version: {torch.__version__}")
print(f"CUDA available: {torch.cuda.is_available()}")
if torch.cuda.is_available():
    print(f"CUDA version: {torch.version.cuda}")
    print(f"GPU: {torch.cuda.get_device_name(0)}")

print(f"MPS (Apple Silicon) available: {torch.backends.mps.is_available()}")

Command-Line Tools

After installation, LeRobot provides several CLI commands:
# System information
lerobot-info

# Hardware utilities
lerobot-find-cameras      # Detect connected cameras
lerobot-find-port         # Find robot serial ports
lerobot-calibrate         # Calibrate robot motors
lerobot-setup-motors      # Configure motor settings
lerobot-find-joint-limits # Determine robot joint limits
lerobot-setup-can         # Configure CAN bus for certain motors

# Data collection
lerobot-teleoperate       # Teleoperate robot
lerobot-record            # Record robot demonstrations
lerobot-replay            # Replay recorded episodes

# Training and evaluation
lerobot-train             # Train a policy
lerobot-eval              # Evaluate a policy

# Dataset tools
lerobot-dataset-viz       # Visualize datasets
lerobot-edit-dataset      # Edit dataset episodes
lerobot-imgtransform-viz  # Visualize image transformations

# Advanced
lerobot-train-tokenizer   # Train custom tokenizers

Troubleshooting

CUDA Issues

If PyTorch doesn’t detect your GPU:
# Check CUDA version compatibility
nvidia-smi

# Install specific PyTorch version for your CUDA
# Visit: https://pytorch.org/get-started/locally/
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118

Import Errors

If you get import errors for optional dependencies:
# Install the specific extra you need
pip install lerobot[<extra_name>]

Version Conflicts

If you encounter dependency conflicts:
# Create a fresh virtual environment
python -m venv lerobot_env
source lerobot_env/bin/activate  # On Windows: lerobot_env\Scripts\activate
pip install lerobot

Apple Silicon (M1/M2/M3) Notes

LeRobot works great on Apple Silicon with MPS acceleration. Make sure you have the latest macOS updates for best performance.
import torch

# Use MPS device on Apple Silicon
device = torch.device("mps") if torch.backends.mps.is_available() else torch.device("cpu")
print(f"Using device: {device}")

Linux-Specific: RealSense Installation

For Intel RealSense cameras on Linux:
# Install system dependencies
sudo apt-get install librealsense2-dkms librealsense2-utils

# Then install Python package
pip install lerobot[intelrealsense]

Environment Setup

1

Create Virtual Environment

python -m venv lerobot_env
2

Activate Environment

# Linux/macOS
source lerobot_env/bin/activate

# Windows
lerobot_env\Scripts\activate
3

Install LeRobot

pip install lerobot
4

Verify Installation

lerobot-info

Using Conda

# Create conda environment
conda create -n lerobot python=3.12
conda activate lerobot

# Install PyTorch (adjust for your system)
conda install pytorch torchvision pytorch-cuda=11.8 -c pytorch -c nvidia

# Install LeRobot
pip install lerobot

Next Steps

Quick Start Guide

Run your first robot learning example

Hardware Setup

Connect and configure your robot

Dataset Guide

Learn to work with robotic datasets

Training Policies

Train your first robot policy

Getting Help

If you encounter issues:
  1. Check the GitHub Issues
  2. Join the Discord community
  3. Search the Hugging Face forums
For hardware-specific issues, consult the Robots documentation for detailed setup guides.

Build docs developers (and LLMs) love