Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do you install poppler on google colab

I was using a python package pdf2img, but I got an error asking me to check if I had installed poppler or not , so I ran "pip install python-poppler-qt5" in a code box in colab , but then I get the following error:

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.

can someone give me a solution to this?

like image 341
Akash Avatar asked Dec 27 '19 08:12

Akash


People also ask

What is the use of poppler in Python?

python-poppler is a Python binding to the poppler-cpp library. It allows to read, render, or modify PDF documents.


1 Answers

Run a cell with the following command first:

!apt-get install poppler-utils 

Here's a complete example notebook that installs deps, downloads an example PDF, and then uses pdf2image to convert it to an image for display.

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

like image 66
Bob Smith Avatar answered Sep 19 '22 15:09

Bob Smith