We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

Sontichai.s
Posts: 10
Joined: Thu Feb 01, 2018 3:29 pm

How to install Zxing decode barcode on raspberrypi 3

Mon Oct 01, 2018 2:26 pm

Hi,
How to install lib Zxing for decode barcode on raspberry Pi 3. I tried solution on this link https://github.com/dlenski/python-zxing
then got message error below.

pi@raspberrypi:~/zxing-master $ sudo pip install zxing
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting zxing
Using cached https://files.pythonhosted.org/packages ... 9.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-EsrCfK/zxing/setup.py", line 34
print("# Do not edit this file, versioning is governed by git tags", file=fh)
^
SyntaxError: invalid syntax

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-EsrCfK/zxing/
pi@raspberrypi:~/zxing-master $

Some one please help me.

scotty101
Posts: 4582
Joined: Fri Jun 08, 2012 6:03 pm

Re: How to install Zxing decode barcode on raspberrypi 3

Mon Oct 01, 2018 3:59 pm

Doesn't look like this Zxing library supports python 2 (see this. Try installing it on python 3 instead.

Code: Select all

sudo pip3 install zxing
Note that this is a python wrapper for a java library and that there are barcode libraries with better python support.
Electronic and Computer Engineer
Pi Interests: Home Automation, IOT, Python and Tkinter

Return to “Python”