unable to run pyzbar on imx8m mini

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

unable to run pyzbar on imx8m mini

1,360 Views
nishanth_
Contributor II

Hi, 

I am trying to run pyzbar library on imx8m mini.

I have included the zbar library in yocto project local.conf while build process. I have installed python3 wrapper using the command

pip3 install pyzbar

python version is 3.7.7, pyzbar version is 0.1.8, and linux version 5.4.24.

 

When I try to import pyzbar in python3 interpreter, I get the below error.

root@imx8mmevk:~# python3
Python 3.7.7 (default, Sep 14 2020, 15:19:24)
[GCC 9.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyzbar import pyzbar
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.7/site-packages/pyzbar/pyzbar.py", line 7, in <module>
from .wrapper import (
File "/usr/lib/python3.7/site-packages/pyzbar/wrapper.py", line 143, in <module>
c_uint_p, # minor
File "/usr/lib/python3.7/site-packages/pyzbar/wrapper.py", line 136, in zbar_function
return prototype((fname, load_libzbar()))
File "/usr/lib/python3.7/site-packages/pyzbar/wrapper.py", line 115, in load_libzbar
libzbar, dependencies = zbar_library.load()
File "/usr/lib/python3.7/site-packages/pyzbar/zbar_library.py", line 66, in load
libzbar = cdll.LoadLibrary(path)
File "/usr/lib/python3.7/ctypes/__init__.py", line 442, in LoadLibrary
return self._dlltype(name)
File "/usr/lib/python3.7/ctypes/__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: /usr/lib/libzbar.so.0: undefined symbol: dsprintbuf

Please suggest

Tags (4)
0 Kudos
Reply
3 Replies

1,349 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello noshanth,

Pyzbar apparently depend of enum34 and pathlib try to install it and try pyxbar again.

 

Regards

 

 

 

0 Kudos
Reply

1,335 Views
nishanth_
Contributor II

Hi,

 

Thanks for your response, now I have enum34 and pathlib libraries. However, I get the same error.

nishanth__0-1620211976344.png

 

 

what do you think?

0 Kudos
Reply

1,327 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Still you may check all dependencies that pyzbar have. in this case dsptrintbuf.

 

 

0 Kudos
Reply