我正在尝试运行pip install zbar
,由于某种原因,我似乎无法找到解决此依赖性问题的答案.任何帮助将非常感激.见下面的追溯:
Downloading/unpacking zbar Downloading zbar-0.10.tar.bz2 Running setup.py egg_info for package zbar Installing collected packages: zbar Running setup.py install for zbar building 'zbar' extension clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c zbarmodule.c -o build/temp.macosx-10.9-x86_64-2.7/zbarmodule.o In file included from zbarmodule.c:24: ./zbarmodule.h:26:10: fatal error: 'zbar.h' file not found #include^ 1 error generated. error: command 'clang' failed with exit status 1 running install running build running build_ext building 'zbar' extension creating build creating build/temp.macosx-10.9-x86_64-2.7 clang -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/Cellar/python/2.7.7_2/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c zbarmodule.c -o build/temp.macosx-10.9-x86_64-2.7/zbarmodule.o In file included from zbarmodule.c:24: ./zbarmodule.h:26:10: fatal error: 'zbar.h' file not found include ^ 1 error generated. error: command 'clang' failed with exit status 1
nelsonvarela.. 5
$ brew install zbar
在那之后
$ pip install zbar
然后将找到头文件(zbar.h)
2年后再次遇到这个问题......这对我有用
LDFLAGS=-L/usr/local/lib/ CPATH=/usr/local/include/ pip install zbar
$ brew install zbar
在那之后
$ pip install zbar
然后将找到头文件(zbar.h)