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 -It can be imported using Python at the system-wide level -
Creating and invoking a venv -Python can still find the module to import within the venv -
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 $
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
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