如何在Google Colab上安装Poppler

时间:2019-12-27 08:43:43

标签: python python-3.x google-colaboratory poppler

我使用的是python软件包pdf2img,但出现错误,要求我检查是否已安装poppler,所以我在colab的代码框中运行了“ pip install python-poppler-qt5”,但随后我出现以下错误:

Collecting python-poppler-qt5 Using cached https://files.pythonhosted.org/packages/6a/7d/65a14ece5dd6a1564b576c1ca30b0f5639be64cc55b62b4d2b497159ed43/python-poppler-qt5-0.75.0.tar.gz
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

有人可以给我解决方案吗?

1 个答案:

答案 0 :(得分:0)

首先使用以下命令运行单元格:

!apt-get install poppler-utils 

这是一个完整的示例笔记本,它可以安装dep,下载示例PDF,然后使用pdf2image将其转换为图像以进行显示。

https://colab.research.google.com/drive/10doc9xwhFDpDGNferehBzkQ6M0Un-tYq