What I’m trying to do:
I’m trying to use the Python 3.10 Beta environment to install custom packages. Pyzbar is included in the Full Python 3 system, but when manually adding it as a package leads to problem. I don’t want to revert to the full python 3 system, as I also want to use the google-api-python-client package.
What I’ve tried and what’s not working:
I first get an error:
ImportError: Unable to find zbar shared library
But when trying to add custom package ‘zbar’, I get:
Building wheels for collected packages: zbar
Building wheel for zbar (setup.py): started
Building wheel for zbar (setup.py): finished with status 'error'
Running setup.py clean for zbar
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
In file included from decoder.c:24:
zbarmodule.h:26:10: fatal error: zbar.h: No such file or directory
26 | #include <zbar.h>
| ^~~~~~~~
compilation terminated.
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
Failed to build zbar
Installing collected packages: zbar, pyzbar, uritemplate, pyasn1, protobuf, httplib2, cachetools, rsa, pyasn1-modules, googleapis-common-protos, google-auth, google-auth-httplib2, google-api-core, google-api-python-client
Running setup.py install for zbar: started
Running setup.py install for zbar: finished with status 'error'
error: subprocess-exited-with-error
× Running setup.py install for zbar did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
/home/anvil/.env/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
In file included from decoder.c:24:
zbarmodule.h:26:10: fatal error: zbar.h: No such file or directory
26 | #include <zbar.h>
| ^~~~~~~~
compilation terminated.
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.
Error: Build failed
Anybody got a solution to this? Thanks in advance!