How to install Python bindings originating from an apt package?

微笑、不失礼 提交于 2019-12-04 03:41:04
sudo apt-get install libzbar-dev
sudo pip install zbar

It is usually a -dev package that you are missing when you get those kind of errors, an easy way to find the package is apt-cache search like below:

~$ apt-cache search zbar
libbarcode-zbar-perl - bar code scanner and decoder (Perl bindings)
libzbar-dev - bar code scanner and decoder (development)
libzbar0 - bar code scanner and decoder (library)
libzbargtk-dev - bar code scanner and decoder (GTK+ bindings development)
libzbargtk0 - bar code scanner and decoder (GTK+ bindings)
libzbarqt-dev - bar code scanner and decoder (Qt bindings development)
libzbarqt0 - bar code scanner and decoder (Qt bindings)
python-qrtools - high level library for reading and generating QR codes
python-zbar - bar code scanner and decoder (Python bindings)
python-zbarpygtk - bar code scanner and decoder (PyGTK bindings)
zbar-dbg - bar code scanner and decoder (debug)
zbar-tools - bar code scanner and decoder (utilities)

FWIW, the procedure I used to install was python-qrtools ,libzbar-dev and finally pip install zbar.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!