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 #131

Open HajarAlnamshan opened 2 years ago

HajarAlnamshan commented 2 years ago

pyzbar library was installed, but the code is not working yet and giving me this error message

Mahmuod1 commented 2 years ago

i have the same issue

uzudraq commented 2 years ago

try using this https://github.com/NaturalHistoryMuseum/pyzbar. I was having same problem but this worked though it shows unable to find dependencies sometimes but works

yzy1996 commented 2 years ago

You'd better search the closed issues before you submit a new one. The reduplicative issue is #37.

mkdir ~/lib
ln -s $(brew --prefix zbar)/lib/libzbar.dylib ~/lib/libzbar.dylib

Hope this will help you!

retoo commented 1 year ago

This works as well:

export DYLD_FALLBACK_LIBRARY_PATH=$(brew --prefix zbar)/lib/

which can for example be automatically be done when loading a project using https://direnv.net/