Donkeycar requires Python 3.11. Ensure you have the correct Python version before proceeding.
System Requirements
Python Version
Donkeycar requires Python 3.11.0 or greater (but less than 3.12):Hardware Requirements
- Raspberry Pi
- Jetson Nano
- PC/Mac
- Raspberry Pi 4 or 5 (recommended: 4GB+ RAM)
- Raspberry Pi OS (64-bit recommended)
- MicroSD card (32GB+ recommended)
- Camera (Pi Camera Module or USB webcam)
Installation by Platform
Raspberry Pi
sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install -y python3-dev python3-pip python3-venv
sudo apt-get install -y libhdf5-dev libatlas-base-dev libjasper-dev
sudo apt-get install -y libqtgui4 libqt4-test git
Add
source ~/donkey/bin/activate to your ~/.bashrc to automatically activate the environment on login.The
[pi] extra automatically installs all dependencies needed for Raspberry Pi, including camera support and TensorFlow Lite.Jetson Nano
The
[nano] extra uses specific versions of NumPy, Matplotlib, and Pandas that are compatible with the Jetson Nano’s ARM architecture and CUDA libraries.# Install TensorFlow for Jetson (provided by NVIDIA)
sudo pip3 install --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v46 tensorflow==2.7.0+nv22.1
PC (Linux/Windows WSL)
sudo apt-get update
sudo apt-get install -y python3-dev python3-pip python3-venv
sudo apt-get install -y libhdf5-dev
The PC installation includes full TensorFlow for training models, unlike the Pi installation which uses TensorFlow Lite for inference only.
macOS
brew install [email protected]
The
[macos] extra includes tensorflow-metal for GPU acceleration on Apple Silicon Macs. This can significantly speed up training.Core Dependencies
All Donkeycar installations include these core dependencies:Installation Extras
Donkeycar uses setuptools extras to provide platform-specific dependencies. You can combine multiple extras:Available Extras
- pi - Raspberry Pi dependencies (camera, GPIO, TFLite)
- nano - Jetson Nano dependencies (Jetson GPIO, compatible library versions)
- pc - PC dependencies (full TensorFlow, training tools)
- macos - macOS dependencies (TensorFlow with Metal GPU support)
- torch - PyTorch and related libraries
- dev - Development dependencies (pytest, mypy, testing tools)
Post-Installation Steps
# Check Donkeycar version
python -c "import donkeycar; print(donkeycar.__version__)"
# Test TensorFlow (if installed)
python -c "import tensorflow as tf; print(tf.__version__)"
# Test PyTorch (if installed)
python -c "import torch; print(torch.__version__)"
Upgrading Donkeycar
To upgrade to the latest version:Installing from Source
For development or to use the latest unreleased features:Troubleshooting
Python version mismatch
Python version mismatch
Donkeycar requires Python 3.11.x. Check your version:If you have multiple Python versions, use:
TensorFlow import error on Raspberry Pi
TensorFlow import error on Raspberry Pi
If you get TensorFlow errors on Raspberry Pi, ensure you installed the The Pi uses TensorFlow Lite, not full TensorFlow.
[pi] extras:Camera not detected (Raspberry Pi)
Camera not detected (Raspberry Pi)
For Pi Camera Module:
- Check physical connection
- Enable camera in
raspi-config - Test with
libcamera-hello --list-cameras - Ensure
picamera2is installed:pip show picamera2
GPU not detected (macOS)
GPU not detected (macOS)
For Apple Silicon Macs:
- Ensure you installed with
[macos]extra - Verify tensorflow-metal is installed:
pip show tensorflow-metal - Test GPU:
Memory errors during installation
Memory errors during installation
If installation fails with memory errors (common on Raspberry Pi):
ImportError: No module named 'donkeycar'
ImportError: No module named 'donkeycar'
This usually means:
- Virtual environment is not activated
- Installed in one Python, running in another
Next Steps
Quick Start
Create your first car application
Configuration
Configure your car for your specific hardware
Calibration
Calibrate steering and throttle
Community
Join the Discord for help and discussions
Getting Help
If you encounter issues:- Check the official documentation
- Search GitHub issues
- Ask on Discord in the #installation-help channel
- Review platform-specific guides in the docs
When asking for help, include:
- Your platform (Pi 4, Jetson Nano, etc.)
- Python version (
python --version) - Donkeycar version (
pip show donkeycar) - Full error message
