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

Python • Re: Issues with code from Raspberry Camera Guide 2nd edition

$
0
0
This is an update,

I have tried the same Python code, both versions and I appear to get similar errors when I run on an RPi5 which is the current version of bookworm with a desktop.
Hi John,

In general, we recommend running the examples from this book locally on a Raspberry Pi with the full desktop. However, it should be possible to get this to work, with some modification to the code.

First, please make sure you've run these commands:

Code:

sudo apt updatesudo apt install -y python3-picamera2
And also please make sure that you have connected to the Pi with

Code:

ssh -X
You will not be able to use Preview.DRM with a remote connection. If you run it with Preview.QTGL and receive an error like Exception: EGL_EXT_image_dma_buf_import missing, then please change Preview.QTGL to Preview.QT and it should work. I tested it just now from a Windows 11 system under WSL and the preview window appeared for me.

Best,

Brian

Statistics: Posted by bjepstone — Sat Dec 21, 2024 6:05 pm



Viewing all articles
Browse latest Browse all 5044

Trending Articles