ImportError: Unable to find zbar shared library

I have deployed a Python script in the free tier of render for hosting but the zbar library from pyzbar is giving me installation error/unable to find. As I mentioned in my requirement.txt file pyzbar==0.1.9 is available but it’s not importing the zbar from there. Can anyone please tell me how to sort this issue out for a successful deployment?

here is the error:

Oct 4 09:53:19 AM mod = importlib.import_module(module)
Oct 4 09:53:19 AM File “/usr/local/lib/python3.7/importlib/init.py”, line 127, in import_module
Oct 4 09:53:19 AM return _bootstrap._gcd_import(name[level:], package, level)
Oct 4 09:53:19 AM File “”, line 1006, in _gcd_import
Oct 4 09:53:19 AM File “”, line 983, in _find_and_load
Oct 4 09:53:19 AM File “”, line 967, in _find_and_load_unlocked
Oct 4 09:53:19 AM File “”, line 677, in _load_unlocked
Oct 4 09:53:19 AM File “”, line 728, in exec_module
Oct 4 09:53:19 AM File “”, line 219, in _call_with_frames_removed
Oct 4 09:53:19 AM File “/opt/render/project/src/main.py”, line 10, in
Oct 4 09:53:19 AM from pyzbar.pyzbar import decode
Oct 4 09:53:19 AM File “/opt/render/project/src/.venv/lib/python3.7/site-packages/pyzbar/pyzbar.py”, line 7, in
Oct 4 09:53:19 AM from .wrapper import (
Oct 4 09:53:19 AM File “/opt/render/project/src/.venv/lib/python3.7/site-packages/pyzbar/wrapper.py”, line 155, in
Oct 4 09:53:19 AM c_uint_p, # minor
Oct 4 09:53:19 AM File “/opt/render/project/src/.venv/lib/python3.7/site-packages/pyzbar/wrapper.py”, line 148, in zbar_function
Oct 4 09:53:19 AM return prototype((fname, load_libzbar()))
Oct 4 09:53:19 AM File “/opt/render/project/src/.venv/lib/python3.7/site-packages/pyzbar/wrapper.py”, line 127, in load_libzbar
Oct 4 09:53:19 AM libzbar, dependencies = zbar_library.load()
Oct 4 09:53:19 AM File “/opt/render/project/src/.venv/lib/python3.7/site-packages/pyzbar/zbar_library.py”, line 65, in load
Oct 4 09:53:19 AM raise ImportError(‘Unable to find zbar shared library’)
Oct 4 09:53:19 AM ImportError: Unable to find zbar shared library
Oct 4 09:54:12 AM ==> Using Node version 14.17.0 (default)
Oct 4 09:54:12 AM ==> Docs on specifying a Node version: Specifying a Node Version | Render

Hey,

I see that you’ve already initiated a support ticket with us. To avoid any confusion or duplicate efforts, let’s continue the conversation there

Jérémy.
Render Support, UTC+3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.