5. Software Environment Setup
Chapter 5 of the SO-ARM Physical AI Beginner's Course — set up the LeRobot software environment on Ubuntu x86 or Jetson: Miniforge, the verified Seeed LeRobot repository, ffmpeg, PyTorch, and the feetech motor dependencies.
5.1 System Requirements
5.1 System Requirements
For Ubuntu x86:
- Ubuntu 22.04
- CUDA 12+
- Python 3.12
- Torch 2.6+
For Jetson Orin:
- Jetson JetPack 6.0 and 6.1 (JetPack 6.2 is not supported yet)
- Python 3.12
- Torch 2.3+
Remember from Chapter 3: avoid WSL or virtual-machine Ubuntu on Windows — native Ubuntu or Jetson gives you the fewest surprises.
5.2 Install LeRobot
5.2 Install LeRobot
Environments such as PyTorch and torchvision need to be installed based on your CUDA version. Follow the tab for your device.
- X86 Ubuntu 22.04
- Jetson Orin
1. Install Miniforge:
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
chmod +x Miniforge3-Linux-x86_64.sh
./Miniforge3-Linux-x86_64.sh
# Once the installation is complete:
source ~/.bashrc
# Initialize all shells
conda init --all
2. Create and activate a fresh conda environment for LeRobot:
conda create -y -n lerobot python=3.12 && conda activate lerobot
3. Clone the verified LeRobot repository:
git clone https://github.com/Seeed-Projects/lerobot.git ~/lerobot
4. Install ffmpeg in your environment:
conda install ffmpeg -c conda-forge
This usually installs ffmpeg 7.X compiled with the libsvtav1 encoder. If libsvtav1 is not supported (check with ffmpeg -encoders), explicitly install ffmpeg 7.1.1:
conda install ffmpeg=7.1.1 -c conda-forge
This also fixes the No valid stream found in input file error that appears later when encoding dataset videos.
5. Install LeRobot with the feetech motor dependencies:
On a newly configured Ubuntu 22.04 machine — especially a minimal install — gcc and other build tools may be missing, and the evdev Python package used by the feetech extra will fail to build. Install them first:
sudo apt update
sudo apt install build-essential
cd ~/lerobot && pip install -e ".[feetech]"
1. Install Miniforge:
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh
chmod +x Miniforge3-Linux-aarch64.sh
./Miniforge3-Linux-aarch64.sh
# Follow the prompts by entering 'yes' or pressing Enter. Once the installation is complete:
source ~/.bashrc
2. Create and activate a fresh conda environment for LeRobot:
conda create -y -n lerobot python=3.12 && conda activate lerobot
3. Clone the verified LeRobot repository:
git clone https://github.com/Seeed-Projects/lerobot.git ~/lerobot
4. Install ffmpeg in your environment:
conda install ffmpeg -c conda-forge
5. Install LeRobot with the feetech motor dependencies:
cd ~/lerobot && pip install -e ".[feetech]"
6. For Jetson JetPack 6.0+ devices (first install PyTorch-gpu and Torchvision from step 5, then run):
conda install -y -c conda-forge "opencv>=4.10.0.84" # Install OpenCV and other dependencies through conda
conda remove opencv # Uninstall the conda OpenCV
pip3 install opencv-python==4.10.0.84 # Reinstall opencv-python via pip3
conda install -y -c conda-forge ffmpeg
conda uninstall numpy
pip3 install numpy==1.26.0 # This should match torchvision
5.3 Verify the Environment
5.3 Verify the Environment
Installing LeRobot via pip can replace the original PyTorch and torchvision with CPU versions, so always check before training. In the lerobot conda environment, run:
python # start Python in the terminal
import torch
print(torch.cuda.is_available())
exit() # exit Python
False→ the current environment uses the CPU version of PyTorch. For GPU training or inference, reinstall the PyTorch and torchvision versions that match your CUDA version following the official PyTorch guide.True→ GPU acceleration is available.
NVIDIA RTX 50-series GPUs require the preview version of CUDA 12.8 or higher:
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
Finally, check that the LeRobot command-line tools are on your PATH:
lerobot-find-port --help
If the command prints help text, the environment is ready for the next chapter, where we configure the motors and assemble the arms.