gpt4 book ai didi

python - 如何在 google colab 上安装 poppler

转载 作者:太空宇宙 更新时间:2023-11-03 19:56:38 69 4
gpt4 key购买 nike

我正在使用 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/

69 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com