Headless Raspberry Pi timelapse camera controller built on Picamera2/libcamera.
- Python >= 3.11
- Raspberry Pi OS (Trixie, 64-bit)
- Raspberry Pi Camera Module 3 (Phase 1)
Picamera2 depends on the system libcamera Python bindings, which are provided by APT
(python3-libcamera). A normal virtualenv does not see system site-packages, so
uv run python -c "from picamera2 import Picamera2" may fail with:
ModuleNotFoundError: No module named 'libcamera'
sudo apt update
sudo apt install -y python3-libcamera python3-picamera2 libcamera-appsCreate a venv that can see system packages
cd /home/pi/picalapse
rm -rf .venv
python3 -m venv --system-site-packages .venvuv pip install -e ".[dev]" --no-deps. .venv/bin/activate
pip install -e ".[dev]" --no-depsuv run picalapse serve --port 8888 --config ./picalapse.toml
python -m picalapse serve --port 8888 --config ./picalapse.toml
If you see errors like:
Failed to acquire camera: Device or resource busyPipeline handler in use by another process
then another service has the camera open (e.g. MotionEye).
Stop it and retry:
sudo systemctl stop motioneye
uv run picalapse servelibcamera-hello --list-cameras