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

Python • picamera2 not working in venv

$
0
0
I dont know what is happening here, on rpi 5 I have a program that uses deepface for that it needed picamera2 library to install but when I run it I get this error :

Traceback (most recent call last):
File "/home/Manas/Desktop/Major2/emotion.py", line 4, in <module>
from picamera2 import Picamera2
File "/home/Manas/Desktop/Major2/venv/lib/python3.11/site-packages/picamera2/__init__.py", line 4, in <module>
import libcamera
ModuleNotFoundError: No module named 'libcamera'

Yes I activated a virtual environment, yes libcamera is working otherwise (libcamera-hello works fine) yes I deleted and clean installed every library, even flashed a new pi os on the sd card. Yet bookworm gives me this error.

Can anyone help me resolve this error ?

Statistics: Posted by Manasrpi5 — Mon Mar 03, 2025 11:00 pm



Viewing all articles
Browse latest Browse all 1294

Trending Articles