无法在Python 3.6上安装pdftotext,缺少poppler [英] Unable to install pdftotext on Python 3.6, missing poppler

查看:373
本文介绍了无法在Python 3.6上安装pdftotext,缺少poppler的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何正确安装pdftotext?

How can I install pdftotext properly?

在Python 3.6中安装pdftotext时,出现以下错误消息.我还尝试通过下载zip文件来手动安装该软件包,但仍然出现相同的错误.

I'm getting the error message below when installing pdftotext in Python 3.6. I also tried to install the package manually by downloading the zip file but still got the same error.

  pdftotext/pdftotext.cpp(4): fatal error C1083: Cannot open include file: 'poppler/cpp/poppler-document.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2     

推荐答案

我在pdftotext包的Readme.md文件中找到了一些帮助:

I found some help in the Readme.md file in the pdftotext package :

1)安装操作系统依赖项:

1) Install OS Dependencies :

在Debian,Ubuntu和朋友上:

on Debian, Ubuntu, and friends:

sudo apt-get update
sudo apt-get install build-essential libpoppler-cpp-dev pkg-config python-dev

在Fedora,Red Hat和朋友上:

on Fedora, Red Hat, and friends:

sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python-devel redhat-rpm-config

2)进行常规安装:

pip install pdftotext

对我有用.

这篇关于无法在Python 3.6上安装pdftotext,缺少poppler的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆