Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with picamera library - Unable to find libmmal.so #107

Open
Minoloi opened this issue Jul 12, 2023 · 1 comment
Open

Issue with picamera library - Unable to find libmmal.so #107

Minoloi opened this issue Jul 12, 2023 · 1 comment
Labels
comp:thirdparty Thirdparty related issues Hardware:USB Accelerator Coral USB Accelerator issues subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:bug Bug

Comments

@Minoloi
Copy link

Minoloi commented Jul 12, 2023

Description

I am experiencing an issue with the picamera library on my Raspberry Pi. When running the classify_capture.py script from the google-coral examples, I encounter the following error:

Traceback (most recent call last):
File "/home/admin/coral/pycoral/google-coral/examples-camera/raspicam/classify_capture.py", line 24, in
import picamera
File "/usr/lib/python3/dist-packages/picamera/init.py", line 72, in
from picamera.exc import (
File "/usr/lib/python3/dist-packages/picamera/exc.py", line 41, in
import picamera.mmal as mmal
File "/usr/lib/python3/dist-packages/picamera/mmal.py", line 49, in
_lib = ct.CDLL('libmmal.so')
OSError: libmmal.so: cannot open shared object file: No such file or directory

I have already performed the following steps to address the issue:

Installed the required packages using sudo apt-get install libraspberrypi0 libraspberrypi-dev libraspberrypi-bin.
Verified that the libmmal.so file exists in the /opt/vc/lib/ directory.
Checked the permissions of the libmmal.so file and ensured that it is readable by the executing user.
Upgraded the picamera library using sudo pip3 install --upgrade picamera.
Despite these efforts, the issue persists, and the script is still unable to locate libmmal.so. I would appreciate any guidance or assistance in resolving this problem.

Thank you for your help!

Click to expand!

Issue Type

Bug

Operating System

Linux

Coral Device

USB Accelerator

Other Devices

Rapsberry Pi 4

Programming Language

Python 3.9

Relevant Log Output

Traceback (most recent call last):
  File "/home/admin/coral/pycoral/google-coral/examples-camera/raspicam/classify_capture.py", line 24, in <module>
    import picamera
  File "/usr/lib/python3/dist-packages/picamera/__init__.py", line 72, in <module>
    from picamera.exc import (
  File "/usr/lib/python3/dist-packages/picamera/exc.py", line 41, in <module>
    import picamera.mmal as mmal
  File "/usr/lib/python3/dist-packages/picamera/mmal.py", line 49, in <module>
    _lib = ct.CDLL('libmmal.so')
OSError: libmmal.so: cannot open shared object file: No such file or directory
@google-coral-bot google-coral-bot bot added comp:thirdparty Thirdparty related issues Hardware:USB Accelerator Coral USB Accelerator issues subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:bug Bug labels Jul 12, 2023
@Axxoul
Copy link

Axxoul commented Sep 23, 2023

Are you running Bullseye?
Bullseye uses libcamera and therefor the example here is not valid anymore since picamera uses Raspberry Pi's legacy camera stack. picamera2 uses the new libcamera stack. Unfortunately I have not been able to make it work myself. You could try to enable the legacy stack in raspi-config.
Did you find a solution in the meantime?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:thirdparty Thirdparty related issues Hardware:USB Accelerator Coral USB Accelerator issues subtype:ubuntu/linux Ubuntu/Linux Build/installation issues type:bug Bug
Projects
None yet
Development

No branches or pull requests

2 participants