Can't install zbar python package
Status: Beta
Brought to you by:
spadix
I'm trying to install zbar python package.
I ran pip install zbar --user
and got:
Downloading/unpacking zbar Downloading zbar-0.10.tar.bz2 Running setup.py (path:/private/var/folders/bw/56c06zmj0r9fc_t4vgs9dmh40000gp/T/pip_build_davidcorbin/zbar/setup.py) egg_info for package zbar Installing collected packages: zbar Running setup.py install for zbar building 'zbar' extension cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c zbarmodule.c -o build/temp.macosx-10.12-intel-2.7/zbarmodule.o In file included from zbarmodule.c:24: ./zbarmodule.h:26:10: fatal error: 'zbar.h' file not found #include <zbar.h> 1 error generated. error: command 'cc' failed with exit status 1 Complete output from command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/bw/56c06zmj0r9fc_t4vgs9dmh40000gp/T/pip_build_davidcorbin/zbar/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bw/56c06zmj0r9fc_t4vgs9dmh40000gp/T/pip-Ch3phr-record/install-record.txt --single-version-externally-managed --compile --user: running install running build running build_ext building 'zbar' extension creating build creating build/temp.macosx-10.12-intel-2.7 cc -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch x86_64 -pipe -I/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c zbarmodule.c -o build/temp.macosx-10.12-intel-2.7/zbarmodule.o In file included from zbarmodule.c:24: ./zbarmodule.h:26:10: fatal error: 'zbar.h' file not found #include <zbar.h> ^ 1 error generated. error: command 'cc' failed with exit status 1 ---------------------------------------- Cleaning up... Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/bw/56c06zmj0r9fc_t4vgs9dmh40000gp/T/pip_build_davidcorbin/zbar/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/bw/56c06zmj0r9fc_t4vgs9dmh40000gp/T/pip-Ch3phr-record/install-record.txt --single-version-externally-managed --compile --user failed with error code 1 in /private/var/folders/bw/56c06zmj0r9fc_t4vgs9dmh40000gp/T/pip_build_davidcorbin/zbar Storing debug log for failure in /var/folders/bw/56c06zmj0r9fc_t4vgs9dmh40000gp/T/tmpL_bjiG
I get a similar error when I download the source code and python setup.py install
.
How can I fix this?
David Corbin
zbar version 1.0
macOS 10.12
uname -a: Darwin DavidsMacBook.local 16.0.0 Darwin Kernel Version 16.0.0: Mon Aug 29 17:56:20 PDT 2016; root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64