Azure-Samples / Custom-vision-service-iot-edge-raspberry-pi

Sample showing how to deploy a AI model from the Custom Vision service to a Raspberry Pi 3 device using Azure IoT Edge
MIT License
186 stars 135 forks source link

ImportError: libhdf5_serial.so.103: cannot open shared object file #77

Open Takahiro-Tsuji opened 2 years ago

Takahiro-Tsuji commented 2 years ago

Please provide us with the following information:

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

  1. Clone the repo.
  2. Update .env file with my container registry.
  3. Build the entire solution by right-clicking on the deployment.template.json file
  4. Building process built for bullseye OS environment. So it failed. 4.1. I searched the image for my stretch version and changed from balenalib/raspberrypi3-debian-python:3.7 to balenalib/raspberrypi3-debian:stretch but building failed because python version is 3.5.3. 4.2. I changed the image to balenalib/raspberrypi3-debian-python:3.7. but building failed with the error. 4.3 I added libhdf5-100 to install list of CameraCapture and changed to azure-iot-device in requirement.txt of SenseHatDisplay. 4.4. built and pushed.
  5. Right-click on the config/deployment.json.
  6. After successful deployment, attach your USB camera to Raspberry Pi 3's hub.
  7. Check the camera status by v4l2-ctl --list-devices and check the camera image by an application.
  8. Open your IoT hub in Azure Portal and check CameraCapture.

    Any log messages given by the failure

    CameraCapture logs the following error:

    Traceback (most recent call last):  
    File "./main.py", line 19, in <module>  
    import CameraCapture  
    File "/CameraCapture.py", line 10, in <module>  
    import cv2  
    File "/usr/local/lib/python3.7/site-packages/cv2/__init__.py", line 5, in <module>  
    from .cv2 import *  
    ImportError: libhdf5_serial.so.103: cannot open shared object file: No such file or directory

    Expected/desired behavior

    CameraCapture detects the camera and has no error.

    OS and Version?

    Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?) Windows10 Home, Raspbian stretch, Docker

    Versions

    Windows10 20H2 build:19042.1526, raspbian , Docker 4.4.4 (73704), Python 3.7

    Mention any other details that might be useful

    sudo iotedge Check from Raspbian says all running. I tried to change from libhdf5-100 to libhdf5-103 but it was not found at build. I have been building from Visual Studio Code. Changed but it always build using cache. How can I re-build all?

    Thanks! We'll be in touch soon.

SatishBoddu-MSFT commented 2 years ago

Related Q&A: https://docs.microsoft.com/en-us/answers/questions/737181/importerror-libhdf5-serialso103-cannot-open-shared.html?childToView=738935