NaturalHistoryMuseum / pyzbar

Read one-dimensional barcodes and QR codes from Python 2 and 3.
MIT License
718 stars 175 forks source link

ImportError: Unable to find zbar shared library #128

Open muneikh opened 2 years ago

muneikh commented 2 years ago

I am running a python program on AWS EC2 AMI instance and getting the following error:

from pyzbar import pyzbar

File "/tmp/readiness/lib/python3.7/site-packages/pyzbar/pyzbar.py", line 7, in from .wrapper import ( File "/tmp/readiness/lib/python3.7/site-packages/pyzbar/wrapper.py", line 143, in c_uint_p, # minor File "/tmp/readiness/lib/python3.7/site-packages/pyzbar/wrapper.py", line 136, in zbar_function return prototype((fname, load_libzbar())) File "/tmp/readiness/lib/python3.7/site-packages/pyzbar/wrapper.py", line 115, in load_libzbar libzbar, dependencies = zbar_library.load() File "/tmp/readiness/lib/python3.7/site-packages/pyzbar/zbar_library.py", line 65, in load raise ImportError('Unable to find zbar shared library') ImportError: Unable to find zbar shared library

I have tried installing zbar using, but nothing works:

pip install pyzbar

klausmcm commented 2 years ago

Have you installed libzbar0? (https://github.com/NaturalHistoryMuseum/pyzbar#installation)