Importerror Unable To Find Zbar Shared Library Mac

  

How to import .so files in AWS Lambda (python)?
Posted on: Nov 28, 2019 4:00 AM
This question is not answered. Answer it to earn points.
I'm trying to import .so files using ctypes.util.find_library() in Python. The files are built with Amazon Linux docker image.
To import the files I tried creating a layer where they're present in /lib/ . I also tried to directly add /lib/ directory in the zip file containing my code. But the files are not detected. Files present in Lambda's default lib directory are getting detected, eg. find_library('png') gives libpng.so.3 as result.
LD_LIBRARY_PATH environment variable contains /opt/lib but Lambda can't read my files
Edited by: secretshardul on Nov 28, 2019 4:00 AM
Replies: 4 | Pages: 1 - Last Post: Apr 18, 2020 2:19 PM by: sharcho
Re: How to import .so files in AWS Lambda (python)?
Posted on: Dec 2, 2019 3:31 PM
This can sometime happen if the library in question has dynamic linking errors/unsatisfied dependencies?
Re: How to import .so files in AWS Lambda (python)?
Posted on: Dec 20, 2019 11:08 PM
I too encountered the same problem. I put libzbar.so* in /opt/lib by Layer and runned the code below. In Python 3.6, no error. But in Python 3.8, it raises ImportError. I believe AWS Lambda's Python 3.8 is corrupted.
Re: How to import .so files in AWS Lambda (python)?
Posted on: Jan 26, 2020 3:29 PM
The problem with find_library in Python 3.8 Runtime is that it relies on ld command (which does not exist in Amazon Linux 2-based Lambda environment) to search for libraries in LD_LIBRARY_PATH.
The new Amazon Linux 2 environment in Lambda is very bare-bone and has been stripped off a lot of utilities.
To have the ld command available on new lambda environment, following commands will attempt to retrieve/extract the binutils package, then put them into a layer.zip file, from which can be used as Lambda Layer source.
Re: How to import .so files in AWS Lambda (python)?
Posted on: Apr 16, 2020 6:51 AM
It seems both ld and objdump (+ dependencies) are required to get find_library to work with AWS Lambda and Python 3.8, which is based on Amazon Linux 2
To find out the dependencies, use the ldd tool.
To verify they are installed correctly run:
Reply to this Thread
Answered question
Unanswered question with answer points still available
Unanswered question
Ace: 2000+ pts
Expert: 750-1999 pts
Guide: 300-749 pts
Enthusiast: 50-299 pts
Newbie: 5-49 pts
Amazonian

Find answers to your python questions. 2020 importerror, opencv, python, zbar. Unable to find zbar shared library. Pip3 uninstall numpy Step 2: Install the Numpy Library. After step 1 the next step is to install the NumPy library again. In you command prompt type the following command.

import pyzbar.pyzbar - Unable to find zbar shared library

Importerror Unable To Find Zbar Shared Library Mac Os

Paweł Magdański

I want to make a script for detecting and reading QR codes from photos. I would like to use PyZbar for that, but I have a problem with some errors.

Find

I'm working in google colaboratory

this is an error I'm struggling with:

Thank You ind advance for your answers

korakot

Before you can !pip install pyzbar, you need to install libzbar with this command.

Then, pyzbar should work.

Collected from the Internet

Please contact [email protected] to delete if infringement.

Importerror Unable To Find Zbar Shared Library Mac

Login to comment

Importerror Unable To Find Zbar Shared Library Macbook

Related

HotTag