Python pip无法安装zbarlight:error:命令'gcc'失败,退出状态为1

时间:2017-05-06 21:56:12

标签: python pip python-3.5 zbar

首先我安装了Python 3.5.1:

yum -y install zbar gcc gcc-c++ kernel-devel
./configure --enable-shared --prefix=/usr/local LDFLAGS="-Wl,--rpath=/usr/local/lib"
make && make install

试图安装zbarlight pypi包但失败了:

    src/zbarlight/_zbarlight.c:137: error: ‘ZBAR_QRCODE’ undeclared (first use in this function)
    src/zbarlight/_zbarlight.c:138: error: ‘ZBAR_CODE128’ undeclared (first use in this function)
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/local/bin/python3.5 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-ur77y560/zbarlight/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-hoalto9f-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-ur77y560/zbarlight/

我该如何解决?我试过pip3.5 -v但没有显示任何更有意义的错误。

1 个答案:

答案 0 :(得分:0)

必须安装

let stopWordsSet = Set(stopWords)