[HOW-TO] Install working picamera2 on Ubuntu 22.04? (needs python3-libcamera)
See original GitHub issueHow can I achieve a working picamera2 on Ubuntu 22.04?
package python3-picamera2 is not located,
sudo pip3 install picamera2 or just pip3 install picamera2 succeeds but …
import picamera2 complains about missing libcamera:
$ python3
Python 3.10.6 (main, Aug 10 2022, 11:40:04) [GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import picamera2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/ubuntu/.local/lib/python3.10/site-packages/picamera2/__init__.py", line 1, in <module>
from .configuration import CameraConfiguration, StreamConfiguration
File "/home/ubuntu/.local/lib/python3.10/site-packages/picamera2/configuration.py", line 1, in <module>
from .controls import Controls
File "/home/ubuntu/.local/lib/python3.10/site-packages/picamera2/controls.py", line 4, in <module>
from libcamera import ControlType, Size, Rectangle
ModuleNotFoundError: No module named 'libcamera'
I have installed libcamera (I thought):
$ dpkg -l | grep libcamera
ii libcamera-dev:arm64 0~git20200629+e7aa92a-9 arm64 complex camera support library (development files)
ii libcamera-tools 0~git20200629+e7aa92a-9 arm64 complex camera support library (tools)
ii libcamera0:arm64 0~git20200629+e7aa92a-9 arm64 complex camera support library
ubuntu@ROS2HH:~/systests/picamera2$
BUT cannot install python3-libcamera:
$ sudo pip3 install python3-libcamera
ERROR: Could not find a version that satisfies the requirement python3-libcamera (from versions: none)
ERROR: No matching distribution found for python3-libcamera
ubuntu@ROS2HH:~/systests/picamera2$
How can I achieve a working picamera2 on Ubuntu 22.04?
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:19
Top Results From Across the Web
How to use the Raspberry Pi High Quality camera on Ubuntu ...
First, to get going with Ubuntu we're going to need to install and set up Ubuntu Core on the ... Enable the camera...
Read more >Raspberry Pi Camera V2.1 on Ubuntu 22.04 - Google Groups
I am pretty sure installing from apt doesn't work. > > > > The packages from the official Ubuntu 22.04 package repos are...
Read more >libcamera is missing in Ubuntu aarch 64, raspberry pi
This answer is based on https://libcamera.org/getting-started.html. First, install the dependencies. sudo apt install build-essential meson ...
Read more >Picamera2 beta release - CyIRC
libcamera can be quite “chatty” in the console window. If this bothers you, type export LIBCAMERA_LOG_LEVELS=*:3 before running Python (or put ...
Read more >Getting Started - libcamera
The following Debian/Ubuntu packages are required for building libcamera. ... pip3 install --user meson pip3 install --user --upgrade meson.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Today I spent some time installing Ubuntu (I found https://ubuntu.com/download/raspberry-pi and installed the recommended desktop version, 22.10)
Ubuntu seems to use python3.10, and there appears to be no way to install python3.9 via a deb package currently.
Unfortunately it seems because the picamera2 packages depend on python3.9 it won’t be possible currently to install via ‘apt’.
One package for example libcamera is compiled against python3.9, so although I tried to bypass the python3.9 requirement by downloading the .deb files and doing something like
sudo dpkg --ignore-depends=python3
, it still wouldn’t function correctly, as the library itself is designed using python3.9.So currently it looks like you’d need to build libcamera etc. from source for Ubuntu’s python 3.10.
@SeanDuffie Hi, thank you for the question. It looks like you’re using a standard Raspberry Pi OS and not Ubuntu, and that your problems relate to using conda, is that correct? Would you be able to open a new issue so that we can avoid getting two different things mixed up in this thread? Thank you very much!