我正在尝试运行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 <zbar.h>
^
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 <zbar.h>
^
1 error generated.
error: command 'clang' failed with exit status 1发布于 2014-12-11 00:16:23
$ brew install zbar在那之后
$ pip install zbar然后将找到头文件(zbar.h)
发布于 2017-08-30 17:04:21
在我的例子中,我运行的是Ubuntu,并且必须安装libzbar-dev包:
sudo apt-get install libzbar-dev
发布于 2016-03-01 20:56:59
时隔2年再次遇到此问题...这就是对我有效的方法
LDFLAGS=-L/usr/local/lib/ CPATH=/usr/local/include/ pip install zbarhttps://stackoverflow.com/questions/25276907
复制相似问题