Skip to content

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

@Minoloi

Description

@Minoloi

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions