LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 12-03-2025, 05:50 AM   #1
thehhague
LQ Newbie
 
Registered: Dec 2025
Posts: 5

Rep: Reputation: 0
Question Libcamera Version Error on Raspberry Pi 5


I am trying to use the IMX500 AI camera on a Raspberry Pi 5 (trixie 13.2). The trouble is that I am using Pyenv to run my virtual environment in Python 3.11 so it is compatible with the Aitrios Raspberry Pi application module library. There are problems using Libcamera in a virtual environment even with –system-site-packages enabled when creating the environment. When I try to install rpi-libcamera in my venv I get a version error

Code:
This package works with libcamera version v0.5.0+59-d83ff0a4, but you have version v0.5.2+99-bfd68f78 installed.
According to the pypi site, I need to ensure compatibility with the versions listed in their table but I seems the libcamera version I have is new and is incompatible with the rpi-libcamera package and is not listed on their table.

How do I revert to libcamera v0.5.0+59-d83ff0a4? Although I suppose the real question is: will this solve the issue?

I don’t want to go messing around with the system’s packages without advice in case I make it worse, I am not an experienced Linux user.
Post Reply1 post • Page 1 of 1
 
Old 12-04-2025, 02:41 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 26,460

Rep: Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608
see here: https://github.com/raspberrypi/pylibcamera
Quote:
apt install -y python3-libcamera
 
Old 12-05-2025, 04:15 AM   #3
thehhague
LQ Newbie
 
Registered: Dec 2025
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the reply. This leaves me with the same error seeing as I now have libcamera build v0.6.0+rpt20251202 which is not compatible with the latest rpi-libcamera which requires libcamera build v0.5.0+59-d8ff0a4.
 
Old 12-05-2025, 04:36 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 26,460

Rep: Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608
what you wrote is confusing. v0.5.0 cannot be the latest (you installed v0.6.0).
How did you install rpi-libcamera? All of these packages should come from the same repo to keep compatibility.
Also, how do you use venv?
 
Old 12-05-2025, 05:48 AM   #5
thehhague
LQ Newbie
 
Registered: Dec 2025
Posts: 5

Original Poster
Rep: Reputation: 0
I first used pyenv to set my terminal to a python3.11 version, then created a venv using
Code:
python -m venv --system-site-packages <my venv name>
. Within the venv I use
Code:
pip install rpi-libcamera
. The rpi-libcamera needs libcamera v0.5.0 to work (an older version), I have libcamera v0.6.0 installed so it throws the error.
 
Old 12-05-2025, 06:44 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 26,460

Rep: Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608
I guess you need to forget that rpi-libcamera and use only python3-libcamera
see here: https://pypi.org/project/rpi-libcamera/ if you really want to use it.
 
Old 12-09-2025, 04:07 AM   #7
thehhague
LQ Newbie
 
Registered: Dec 2025
Posts: 5

Original Poster
Rep: Reputation: 0
What part specifically from that link are you referring to? I have followed the instructions offered on that site and have had no luck due to version incompatibility. For reference libcamera works just fine on a venv running in the default version of Python on the raspberry pi but it seems that using pyenv to go back to 3.11 is what causes the problem. But I have to use 3.11 for the Aitrios library.
 
Old 12-09-2025, 04:33 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 26,460

Rep: Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608
As they wrote, do not use rpi-libcamera unless it is unavoidable for some reason.
use only python3-libcamera, if possible.
That is one side.

The other side is, if you still need it use
Quote:
sudo apt install -y libcamera-dev
pip install rpi-libcamera
which will put the module into your [current] venv, and also will build the mentioned lib (which will [obviously] compatible with that venv). But in this case don't use --system-site-packages, because that is not compatible with this venv.
 
Old 12-09-2025, 05:06 AM   #9
thehhague
LQ Newbie
 
Registered: Dec 2025
Posts: 5

Original Poster
Rep: Reputation: 0
So I guess the problem is with the venv because I have libcamera installed already as default. Maybe the Aitrios library has not caught up to the current state of raspberry pi and IMX500 software in December 2025, strange considering that is the library's sole purpose.
 
Old 12-09-2025, 05:30 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 26,460

Rep: Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608Reputation: 8608
the python module is tied to the lib (to the given version), it is not related to anything else. That's why when you load (import) the module it will look for the compatible version of the so file.
So either you use an older module with an older lib or the current module with the current lib or build/install both the module and lib together.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Raspberry Pi Compute Module 5 Launches as a Modular Version of Raspberry Pi 5 LXer Syndicated Linux News 0 11-28-2024 05:12 AM
LXer: Raspberry Pi 4 gains 8GB RAM version and 64-bit Raspberry Pi OS LXer Syndicated Linux News 0 05-28-2020 11:21 PM
LXer: Raspberry Pi: Combine a Raspberry Pi with up to 4 Raspberry Pi Zeros for less than US$50 with the Cluster HAT LXer Syndicated Linux News 0 07-05-2019 12:03 PM
LXer: Libcamera successor to V4L2 hopes to ease embedded Linux camera headaches LXer Syndicated Linux News 0 12-04-2018 10:00 PM
Regarding distribution + kernel version + gcc version + glib version. JCipriani Linux - General 8 04-19-2008 02:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 05:02 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions