> python3 -m pip install zbar
Collecting zbar
Using cached zbar-0.10.zip (31 kB)
Preparing metadata (setup.py) ... done
Installing collected packages: zbar
DEPRECATION: zbar is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
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
╰─> [48 lines of output]
running install
running build
running build_ext
building 'zbar' extension
creating build
creating build/temp.macosx-11.5-x86_64-3.8
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/guglielmo/.pyenv/versions/3.8.11/include/python3.8 -c zbarmodule.c -o build/temp.macosx-11.5-x86_64-3.8/zbarmodule.o
In file included from zbarmodule.c:24:
./zbarmodule.h:42:5: error: unknown type name 'PyIntObject'; did you mean 'PySetObject'?
PyIntObject val; /* integer value is super type */
^~~~~~~~~~~
PySetObject
/Users/guglielmo/.pyenv/versions/3.8.11/include/python3.8/setobject.h:65:3: note: 'PySetObject' declared here
} PySetObject;
^
zbarmodule.c:66:32: error: too few arguments to function call, expected 3, have 2
zbar_version(&major, &minor);
~~~~~~~~~~~~ ^
/usr/local/include/zbar.h:270:12: note: 'zbar_version' declared here
extern int zbar_version(unsigned *major,
^
zbarmodule.c:112:9: error: non-void function 'initzbar' should return a value [-Wreturn-type]
return;
^
zbarmodule.c:115:34: error: use of undeclared identifier 'PyInt_Type'; did you mean 'PySet_Type'?
zbarEnumItem_Type.tp_base = &PyInt_Type;
^~~~~~~~~~
PySet_Type
/Users/guglielmo/.pyenv/versions/3.8.11/include/python3.8/setobject.h:77:26: note: 'PySet_Type' declared here
PyAPI_DATA(PyTypeObject) PySet_Type;
^
zbarmodule.c:129:9: error: non-void function 'initzbar' should return a value [-Wreturn-type]
return;
^
zbarmodule.c:137:13: error: non-void function 'initzbar' should return a value [-Wreturn-type]
return;
^
zbarmodule.c:146:21: error: implicit declaration of function 'Py_InitModule' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
PyObject *mod = Py_InitModule("zbar", zbar_functions);
^
zbarmodule.c:146:15: warning: incompatible integer to pointer conversion initializing 'PyObject *' (aka 'struct _object *') with an expression of type 'int' [-Wint-conversion]
PyObject *mod = Py_InitModule("zbar", zbar_functions);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
zbarmodule.c:148:9: error: non-void function 'initzbar' should return a value [-Wreturn-type]
return;
^
1 warning and 8 errors generated.
error: command 'clang' failed with exit status 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.