Skip to content

Latest commit

 

History

History
63 lines (37 loc) · 3.13 KB

dependencies.md

File metadata and controls

63 lines (37 loc) · 3.13 KB

Installing Dependencies

These instructions are known to work with Ubuntu 14.04 and Ubuntu 16.04. Instructions for Ubuntu 20.04 are listed separately below where they differ. If you have further information, please provide it!

Loris (Pillow, actually, with the exception of Kakadu) depends on several external libraries that can't be installed with pip, so there are few steps that must be carefully followed to get going. Installing the dependencies manually is a good idea if you want to run the tests.

Install Kakadu for JPEG2000 Support.

From Version 2.0 on, setup.py does not install Kakadu. The copies included with the distribution are intended for continuous integration and unit testing. These copies may be used, provided they work in your environment and that you comply with the terms outlined by NewSouth Innovations. Please see their website or LICENSE-Kakadu.txt for details.

If you are deploying on a different system or architecture, you can Download the appropriate version of Kakadu for your system, if it is available, or else contact Kakadu for a license. You need at least version 7.0 for all features to work properly.

Install pip and setuptools

pip is used to install dependencies; setuptools is used to install Loris.

$ sudo apt-get install python-pip python-setuptools

For Ubuntu 20:

$ sudo apt update              # Do not skip this step
$ sudo apt install python3-pip # No need to install python3-setuptools
$ pip3 --version               # Verify that PIP is installed

Install Pillow

Pillow's external dependencies MUST be built/installed before Pillow is installed, so, to be safe, first remove all instances of PIL or Pillow, including, but not limited to, the python-imaging package:

$ sudo pip uninstall PIL
$ sudo pip uninstall Pillow
$ sudo apt-get purge python-imaging

Then, install all of the dependencies--note that exact versions may vary depending on your package manager and OS version:

$ sudo apt-get install libjpeg-turbo8-dev libfreetype6-dev zlib1g-dev \
liblcms2-dev liblcms2-utils libtiff5-dev python-dev libwebp-dev apache2 \
libapache2-mod-wsgi-py3

For CentOS:

$ sudo yum install zlib-devel freetype libjpeg-turbo-devel lcms2-utils \ 
libtiff-devel libwebp-devel openjpeg2

Now install Pillow (setup.py would do this for you, but it's better to do separately and check):

$ sudo pip install Pillow

For Ubuntu 20:

$sudo pip3 install Pillow

In case you plan on working on the source code without running setup.py, the following are required python libraries that must currently exist in your Python environment:

$ sudo pip install configobj
$ sudo pip install requests
$ sudo pip install mock
$ sudo pip install responses

Proceed to set Configuration Options or go Back to README