Closed tkundrat closed 3 months ago
I did some more digging around on the internet, and I read that normally the library files for this library are really located under .so.0
and the .so
files are only symlinks to these files. So I created symlinks for all .so
files with the ending .so.0
inside the /opt/vc/lib/
folder and also inside /usr/lib/
. Now the library can be found and av
can be imported (and the stream
integration for homeassistant
also works!)
Overview
I've upgraded my python venv (running
homeassistant
) from Python3.11.6 to Python3.12.2 today. When startinghass
, I get an error message statingav
cannot be imported because a shared object file is missing.Expected behavior
import av
works successfully.Actual behavior
We try
import av
, but we getImportError: libmmal_core.so.0: cannot open shared object file: No such file or directory
.Traceback:
Investigation
libmmal libraries are detected by
ldconfig -p
symlinks from libmmal_core.so.0 to libmmal_core.so and others are present
Library directory is included for ldconfig:
Reproduction
(Try to use
homeassistant>=2024.4
with thestream
integration, which needsha-av
, a fork ofav
. When force using plainav==12.0.0
the issue persists. Or short version:)pip install av
orpip install av --no-binary av
, then try toimport av
.Versions
uname -a: Linux raspi4 6.1.58-v8+ #1692 SMP PREEMPT Thu Oct 19 17:06:12 BST 2023 aarch64 GNU/Linux
Traceback (most recent call last): File "", line 189, in _run_module_as_main
File "", line 148, in _get_module_details
File "", line 112, in _get_module_details
File "/home/pi/test-venv/lib/python3.12/site-packages/av/init.py", line 20, in
from av._core import time_base, library_versions
ImportError: libmmal_core.so.0: cannot open shared object file: No such file or directory
$ pip3 install --force-reinstall --no-cache-dir av -vvv av --no-binary av