python - 如何在 google colab 上安装 poppler

标签 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.

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

最佳答案

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

!apt-get install poppler-utils 

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

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

关于python - 如何在 google colab 上安装 poppler,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59498115/

相关文章:

python程序计算句子中每个单词中的字母

python - 扩展 Django 用户模型无法访问属性

Python 类型错误 : can only concatenate list (not "int") to list for Parkes error grid

python-3.x - Pandas:通过忽略大小写来检查列值(转换大小写)

python - 如何在特定字符之外的指定位置拆分重复字符串?

google-drive-api - 在运行时在 Google Colab 中重新验证或删除验证 Pydrive

python - Google Colab 在下载数据集或将新包导入 colab notebook 时是否会使用我的互联网流量?

python - 无法使用 Ubuntu 导入 python-numpy

django - 如何使用 Django-Haystack 预先选择构面(即在页面加载时选中复选框)?

google-colaboratory - XLNetTokenizer 需要 SentencePiece 库,但在您的环境中找不到