Mintu Agarwal
Posted on December 13, 2023
Recently for my Python project, I wanted to create images of the generated PDF from my script. I added an option to whether I want to create the images and used pdf2image.convert_from_path
to create jpeg files for the same.
However, the installation of pdf2image isn't your usual pip3 install pdf2image
. It would rather throw an error like this -
The headers or library files could not be found for jpeg,
a required dependency when compiling Pillow from source.
So first install some dependencies into your system using and then execute you pip3 install
command
sudo apt-get install libjpeg-dev zlib1g-dev
pip3 install pdf2image
Also
💖 💪 🙅 🚩
Mintu Agarwal
Posted on December 13, 2023
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.