Score:1

libcamera is missing in Ubuntu aarch 64, raspberry pi

co flag

I installed picamera2 on raspberry pi using ubuntu arch 64 bit. However, I face this error, when I import picamera2. It seems the problem only occurs on raspberry pi.

>>> import picamera2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ahmad/.local/lib/python3.10/site-packages/picamera2/__init__.py", line 1, in <module>
    from .configuration import CameraConfiguration, StreamConfiguration
  File "/home/ahmad/.local/lib/python3.10/site-packages/picamera2/configuration.py", line 1, in <module>
    from .controls import Controls
  File "/home/ahmad/.local/lib/python3.10/site-packages/picamera2/controls.py", line 4, in <module>
    from libcamera import ControlType, Size, Rectangle
ModuleNotFoundError: No module named 'libcamera'

Any suggestion please? Thank you in advance!

David avatar
cn flag
Please explain what you are trying to do and why may help as well. I find it impossible to follow what it is you are asking.
David avatar
cn flag
Have you install that app? See this site. https://www.arducam.com/docs/cameras-for-raspberry-pi/what-is-libcamera/
Ahmad Alhonainy avatar
co flag
Thank you @David, I installed picamera2 to capture pictures using raspberry pi, however when I run python code it is complain about libcamera, it is not installed on ubuntu 20.04.
David avatar
cn flag
So I guess the fix is to install it.
Ahmad Alhonainy avatar
co flag
Hi @David, the link that you shared, showed this message: Cannot find the corresponding package, please send the following information to support@arducam.com Hardware Revision: c03114 Kernel Version: 5.15.0-1012-raspi Package: libcamera_dev -- Jammy Jellyfish-arm64
Score:0
us flag

This answer is based on https://libcamera.org/getting-started.html


First, install the dependencies.

sudo apt install build-essential meson ninja libyaml-dev python3-yaml python3-ply python3-jinja2 libssl-dev openssl git

Then, download the source code,

git clone https://git.libcamera.org/libcamera/libcamera.git

Go to the directory,

cd libcamera

And compile.

meson build
sudo ninja -C build install
Ahmad Alhonainy avatar
co flag
I installed libcamera using this command: sudo apt install libcamera-dev however, this error still there: ModuleNotFoundError: No module named 'libcamera'. Could you please suggest any idea? I am using python3.10.6
Ahmad Alhonainy avatar
co flag
When I run this command sudo apt install libcamera-dev, I tried to run libcamera-hello,however its not working, I got libcamera-hello: command not found. I believe the previous command did not install all dependencies.
us flag
@AhmadAlhonainy I have edited the answer
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.