3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

RPi5(bookworm)でpicamera2にlibcameraがない

Last updated at Posted at 2024-06-09

背景

新しい自動運転ミニカーをラズパイベースで作成した際、donkeycarを新しくインストールしなおしたら、picamera2の設定でつまずいた。

環境

モデル OS  Donkeycar Ver
Raspberry Pi 5 Model B Rev 1.0 bookworm  donkeycar v5.1

問題:libcameraがない

"/home/hoge/hoge/lib/python3.11/site-packages/picamera2/__init__.py", line 3, in <module>
import libcamera
ModuleNotFoundError: No module named 'libcamera'

解決方法

sudo apt install -y libcamera-dev
pip install rpi-libcamera

pykmsも併せて必要でした。

sudo apt install -y python3-kms++
sudo apt install -y libkms++-dev libfmt-dev libdrm-dev
pip install rpi-kms

*pipする際は下記のように仮想環境内で実施してください。

python3 -m venv --system-site-packages my-env

参考

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?