Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7712

Troubleshooting • Re: No module named 'libcamera'

$
0
0
Maybe time to experiment with a fresh installation of your RasPiOS Bookworm OS?

This seems to be working for me with 64-bit RasPiOS Bookworm on an RPi[5] board.


The package is 'bundled' with the OS -

Code:

david@rp54bw64full0512:~/Support/gjg $ apt policy python3-picamera2python3-picamera2:  Installed: 0.3.18-1  Candidate: 0.3.18-1  Version table: *** 0.3.18-1 500        500 http://archive.raspberrypi.com/debian bookworm/main arm64 Packages        500 http://archive.raspberrypi.com/debian bookworm/main armhf Packages        100 /var/lib/dpkg/statusdavid@rp54bw64full0512:~/Support/gjg $ 
It can be imported using Python at the system-wide level -

Code:

david@rp54bw64full0512:~ $ pythonPython 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from picamera2 import Picamera2>>> david@rp54bw64full0512:

Creating and invoking a venv -

Code:

david@rp54bw64full0512:~/Support/gjg $ python -m venv --system-site-packages gjgdavid@rp54bw64full0512:~/Support/gjg $ source gjg/bin/activate
Python can still find the module to import within the venv -

Code:

(gjg) david@rp54bw64full0512:~/Support/gjg $ python Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from picamera2 import Picamera2>>> 

Statistics: Posted by B.Goode — Sun May 05, 2024 9:54 am



Viewing all articles
Browse latest Browse all 7712

Trending Articles