Cant install vilib for Picar-x on a new Raspberry Pi 5. (Python 3.13)

Hi,

I have a new raspberry Pi 5 that comes with Python 3.13. and a Picar-X

I try to follow the instructions for installing the software for the Picar-x but when I come to vilib it fails. (It says it only supports python 3.12).

I have tried multiple ways including pyenv, downgrading to python 3.11, as the support-chat said, but nothing works. (I am not completely new at Python but I am new to Linux since I only worked with windows before )

Is there a new instruction some where that is up to date if one buys a new Picar-x and a new raspberry pi 5 and try to follow the instructions?

P.S.
I got this suggestion from the support-chat but it says that there is no v2.0 branch

cd ~
git clone -b v2.0 GitHub - sunfounder/vilib: Vision library for python · GitHub
cd vilib
sudo python3 setup.py install

That’s correct. Trixie comes with python 3.13, for which tflite and mediapipe are not supported. You can either downgrade your OS to bookworm or ignore it as described here..

The issue you are encountering is that vilib includes mediapipe, and mediapipe does not currently support Python 3.13. We have reported this to the mediapipe team multiple times and are waiting for them to update their library.

If you need to use mediapipe, we recommend installing Raspberry Pi OS Bookworm instead of Trixie.

However, please note that PiCar‑X does not actually require mediapipe to function. You can safely ignore the mediapipe installation warning, and the PiCar‑X should still work normally.

I did a new image with bookworm 64-bit and all installations went through without a problem.
(P.S. The documentation picture when creating an image is a picture of Trixie)

When I try to run 7. Computer Vision the picture is frozen. There is no stream. I found some troubleshooting to check that the camera works and it does. I can get a stream outside of the 7. Computer Vision.

Any tips on that part?

May I ask – are you running the “7. Computer Vision” example within the Raspberry Pi desktop environment?

If so, the behavior you’re seeing is typically normal. This example primarily outputs the video stream via an MJPEG web service. The local OpenCV preview window may briefly flash and then close automatically. This is related to the combination of Raspberry Pi OS, the OpenCV version, and the display environment – it does not mean the program has failed.

What to do:After the script is running, please open a web browser on any device connected to the same network and go to:http://<Your_Raspberry_Pi_IP_Address>:9000/mjpg

For example, if your Pi’s IP address is 192.168.1.100, you would visit:

http://192.168.1.100:9000/mjpg

As long as you can see the live camera feed in the web page, your camera and the program are working perfectly.

Hi,
I do run the example through Raspberry Pi desktop environment.
When I connect to my local adress: http://192.168.73.177:9000/mjpg, either through my Pi or through a computer in my network I can see a picture. But it is not a feed. It is a frozen picture from the camera.

This example is not designed to run in the desktop environment. Please try running the code via SSH instead. Then open a browser and you should see the live video feed.