I have a site hosted in Heroku and now I want to use the python-qrtools package that uses the ZBar barcode scanner . On regular debian (based), I can do simple:
sudo apt-get install python-qrtools
According to the dpkg-query -L python-qrtools this sets up the following:
/usr/lib/python2.7/dist-packages/qrtools-1.2.egg-info /usr/lib/python2.7/dist-packages/qrtools.py /usr/share/doc/python-qrtools/copyright /usr/share/doc/python-qrtools/changelog.Debian.gz
When I look at qrtools.py import, it also does import zbar , which (as I understand it) is python binding for the Zbar package ( Pypi link here ). I am very surprised that zbar or its python bindings are not on the list with the python-qrtools apt package. So my first question is:
When and where is this zbar package installed?
Moving on, I decided to install ZBar and the python binding for it on Heroku. I was able to install ZBar using this ZBar buildpack , so I only need to set the binding to Zbar Python. From the python command line, I can already see that this is a binding coming from a .so file:
>>> import zbar >>> zbar.__file__ '/usr/lib/python2.7/dist-packages/zbar.so'
So, I made a simple sudo pip install zbar , which, unfortunately, leads to a massive compilation error, which I inserted below. So my main question is this:
How to set python zbar bindings separately (so without apt)? All tips are welcome!
Downloading/unpacking zbar Downloading zbar-0.10.tar.bz2 Running setup.py (path:/tmp/pip_build_root/zbar/setup.py) egg_info for package zbar Installing collected packages: zbar Running setup.py install for zbar building 'zbar' extension x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c zbarmodule.c -o build/temp.linux-x86_64-2.7/zbarmodule.o In file included from zbarmodule.c:24:0: zbarmodule.h:26:18: fatal error: zbar.h: No such file or directory
So, I tried to set the Python zbar binding separately using
Unfortunately, I can't even install the zbar package on linux
python linux debian apt zbar
kramer65 Dec 10 '14 at 16:57 2014-12-10 16:57
source share