python 安装pypoppler时出错

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了python 安装pypoppler时出错相关的知识,希望对你有一定的参考价值。

>sudo pip install pypoppler
Collecting pypoppler
  Downloading pypoppler-0.12.2.tar.gz
    Complete output from command python setup.py egg_info:
    Package pygobject-2.0 was not found in the pkg-config search path.
    Perhaps you should add the directory containing `pygobject-2.0.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'pygobject-2.0' found
    Package pycairo was not found in the pkg-config search path.
    Perhaps you should add the directory containing `pycairo.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'pycairo' found
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/private/tmp/pip-build-quTj5x/pypoppler/setup.py", line 80, in <module>
        sources = ['poppler.c', 'popplermodule.c'],
      File "/private/tmp/pip-build-quTj5x/pypoppler/setup.py", line 38, in __init__
        for item, value in pkgconfig(*PACKAGES).items():
      File "/private/tmp/pip-build-quTj5x/pypoppler/setup.py", line 30, in pkgconfig
        for token in subprocess.check_output(['pkg-config', '--libs', '--cflags', ' '.join(packages)]).split():
      File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 573, in check_output
        raise CalledProcessError(retcode, cmd, output=output)
    subprocess.CalledProcessError: Command '['pkg-config', '--libs', '--cflags', 'poppler-glib pygobject-2.0 pycairo']' returned non-zero exit status 1
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-quTj5x/pypoppler

以上是关于python 安装pypoppler时出错的主要内容,如果未能解决你的问题,请参考以下文章

python安装pymongo时出错

安装 python 模块时出错

安装graphtool python时出错

为 python 安装 Dlib 库时出错

安装 mysql-python 时出错:找不到 -lssl 的库

python安装pillow时出错(ubuntu)