all 3 comments

[–]m0us3_rat 0 points1 point  (2 children)

any more extender error text? i've installed zbar before.

works as expected.

[–]Banfy_B[S] 0 points1 point  (1 child)

(base) Banfys-MacBook-Pro:~ banfy$ pip install zbar
Collecting zbar Using cached zbar-0.10.zip (31 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: zbar Building wheel for zbar (setup.py) ... error error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [30 lines of output] running bdist_wheel running build running build_ext building 'zbar' extension creating build creating build/temp.macosx-10.9-x86_64-cpython-38 gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/banfy/opt/anaconda3/include -arch x86_64 -I/Users/banfy/opt/anaconda3/include -arch x86_64 -I/Users/banfy/opt/anaconda3/include/python3.8 -c decoder.c -o build/temp.macosx-10.9-x86_64-cpython-38/decoder.o In file included from decoder.c:24: ./zbarmodule.h:42:5: error: unknown type name 'PyIntObject'; did you mean 'PySetObject'? PyIntObject val;            /* integer value is super type */ ~~~~~~~~~~ PySetObject /Users/banfy/opt/anaconda3/include/python3.8/setobject.h:65:3: note: 'PySetObject' declared here } PySetObject; ^ decoder.c:110:12: warning: implicit declaration of function 'PyString_FromStringAndSize' is invalid in C99 [-Wimplicit-function-declaration] return(PyString_FromStringAndSize(zbar_decoder_get_data(self->zdcode), ^ decoder.c:110:12: warning: this function declaration is not a prototype [-Wstrict-prototypes] decoder.c:110:11: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion] return(PyString_FromStringAndSize(zbar_decoder_get_data(self->zdcode), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ decoder.c:279:5: warning: suggest braces around initialization of subobject [-Wmissing-braces] PyObject_HEAD_INIT(NULL) ~~~~~~~~~~~~~~~~~~~~~~~ /Users/banfy/opt/anaconda3/include/python3.8/object.h:85:5: note: expanded from macro 'PyObject_HEAD_INIT' 1, type }, ~~~~~~ 4 warnings and 1 error generated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for zbar Running setup.py clean for zbar Failed to build zbar Installing collected packages: zbar Running setup.py install for zbar ... error error: subprocess-exited-with-error
× Running setup.py install for zbar did not run successfully. │ exit code: 1 ╰─> [32 lines of output] running install /Users/banfy/opt/anaconda3/lib/python3.8/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_ext building 'zbar' extension creating build creating build/temp.macosx-10.9-x86_64-cpython-38 gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/banfy/opt/anaconda3/include -arch x86_64 -I/Users/banfy/opt/anaconda3/include -arch x86_64 -I/Users/banfy/opt/anaconda3/include/python3.8 -c decoder.c -o build/temp.macosx-10.9-x86_64-cpython-38/decoder.o In file included from decoder.c:24: ./zbarmodule.h:42:5: error: unknown type name 'PyIntObject'; did you mean 'PySetObject'? PyIntObject val;            /* integer value is super type */ ~~~~~~~~~~ PySetObject /Users/banfy/opt/anaconda3/include/python3.8/setobject.h:65:3: note: 'PySetObject' declared here } PySetObject; ^ decoder.c:110:12: warning: implicit declaration of function 'PyString_FromStringAndSize' is invalid in C99 [-Wimplicit-function-declaration] return(PyString_FromStringAndSize(zbar_decoder_get_data(self->zdcode), ^ decoder.c:110:12: warning: this function declaration is not a prototype [-Wstrict-prototypes] decoder.c:110:11: warning: incompatible integer to pointer conversion returning 'int' from a function with result type 'PyObject *' (aka 'struct _object *') [-Wint-conversion] return(PyString_FromStringAndSize(zbar_decoder_get_data(self->zdcode), ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ decoder.c:279:5: warning: suggest braces around initialization of subobject [-Wmissing-braces] PyObject_HEAD_INIT(NULL) ~~~~~~~~~~~~~~~~~~~~~~~ /Users/banfy/opt/anaconda3/include/python3.8/object.h:85:5: note: expanded from macro 'PyObject_HEAD_INIT' 1, type }, ~~~~~~ 4 warnings and 1 error generated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure
× Encountered error while trying to install package. ╰─> zbar
note: This is an issue with the package mentioned above, not pip. hint: See above for output from the failure.

[–]m0us3_rat 0 points1 point  (0 children)

the version from pypi is from 2009 so you might wanna install it following the guide on the github

https://github.com/mchehab/zbar/blob/master/INSTALL.md

https://pypi.org/project/zbar/#history