Installation for python3 not possible
Status: Beta
Brought to you by:
spadix
Can you please add support for Python 3?
------------------------------------------------------------
[20150602 190635] ~ » sudo pip3 install --upgrade zbar :( (1)
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 -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c zbarmodule.c -o build/temp.linux-x86_64-3.4/zbarmodule.o
In file included from zbarmodule.c:24:0:
zbarmodule.h:42:5: error: unknown type name ‘PyIntObject’
PyIntObject val; /* integer value is super type */
^
zbarmodule.c: In function ‘initzbar’:
zbarmodule.c:112:9: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
zbarmodule.c:115:34: error: ‘PyInt_Type’ undeclared (first use in this function)
zbarEnumItem_Type.tp_base = &PyInt_Type;
^
zbarmodule.c:115:34: note: each undeclared identifier is reported only once for each function it appears in
zbarmodule.c:129:9: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
zbarmodule.c:137:13: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
zbarmodule.c:146:5: warning: implicit declaration of function ‘Py_InitModule’ [-Wimplicit-function-declaration]
PyObject *mod = Py_InitModule("zbar", zbar_functions);
^
zbarmodule.c:146:21: warning: initialization makes pointer from integer without a cast [enabled by default]
PyObject *mod = Py_InitModule("zbar", zbar_functions);
^
zbarmodule.c:148:9: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Complete output from command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/zbar/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-stbe9_fv-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building 'zbar' extension
creating build
creating build/temp.linux-x86_64-3.4
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.4m -c zbarmodule.c -o build/temp.linux-x86_64-3.4/zbarmodule.o
In file included from zbarmodule.c:24:0:
zbarmodule.h:42:5: error: unknown type name ‘PyIntObject’
PyIntObject val; /* integer value is super type */
^
zbarmodule.c: In function ‘initzbar’:
zbarmodule.c:112:9: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
zbarmodule.c:115:34: error: ‘PyInt_Type’ undeclared (first use in this function)
zbarEnumItem_Type.tp_base = &PyInt_Type;
^
zbarmodule.c:115:34: note: each undeclared identifier is reported only once for each function it appears in
zbarmodule.c:129:9: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
zbarmodule.c:137:13: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
zbarmodule.c:146:5: warning: implicit declaration of function ‘Py_InitModule’ [-Wimplicit-function-declaration]
PyObject *mod = Py_InitModule("zbar", zbar_functions);
^
zbarmodule.c:146:21: warning: initialization makes pointer from integer without a cast [enabled by default]
PyObject *mod = Py_InitModule("zbar", zbar_functions);
^
zbarmodule.c:148:9: warning: ‘return’ with no value, in function returning non-void [-Wreturn-type]
return;
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/tmp/pip_build_root/zbar/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-stbe9_fv-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip_build_root/zbar
Storing debug log for failure in /home/matthias/.pip/pip.log
------------------------------------------------------------
Hi
I guess the zbar project is not supported since, it is not updated since 2009.
Try https://github.com/zplab/zbar-py
It is a simple zbar extension for python3
For the archive:
sudo apt install python3-dev
If you are using other python versions:
sudo apt install python3.X-dev
For Python 3.9:
sudo apt install python3.9-dev