img2pdf on CentOS 7 - jneubert/doc GitHub Wiki

Legacy Python2 version

Install requirements

sudo yum install libjpeg python-pillow python-setuptools

Install pip

cd /usr/local/src
sudo curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py --no-setuptools --no-wheel

Install legacy package (requires enum34 with backuports to 2.7)

sudo pip install enum34
sudo pip install img2pdf-legacy-python

obsolete: Python3 version

Due to a minor incompatibility, img2pdf 0.?? does not work on Python 2.7. Therefore, python34 has to be installed.

For CentOS

sudo yum install python34 python34-devel

For RHEL (with rhel-server-rhscl-7-rpms repo enabled)

sudo yum install rh-python36 rh-python36-scldevel

libjpeg is required by the Pillow package, which substitutes python-pil

sudo yum install libjpeg-turbo libjpeg-turbo-devel gcc

Installing Python image library

easy_install-3.6 Pillow bzw. sudo scl enable rh-python36 "easy_install-3.6 Pillow"