Skip to content

Instantly share code, notes, and snippets.

@ekiara
Created August 25, 2014 17:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekiara/06ecb762ccf7afbfb530 to your computer and use it in GitHub Desktop.
Save ekiara/06ecb762ccf7afbfb530 to your computer and use it in GitHub Desktop.
Installing reportlab 'the right way'

Installing reportlab the right way

Doing a pip install reportlab on a relatively new/clean linux setup will probably result in something similar to this:

    --------------------------------------------------------------------
    PIL SETUP SUMMARY
    --------------------------------------------------------------------
    version      Pillow x.y.z
    platform     linux2 2.x.y (default, MM dd YYYY, 01:01:01)
                 [GCC 4.x.y 20yymmdd (Red Hat x.y.z-a)]
    --------------------------------------------------------------------
    *** TKINTER support not available
    *** JPEG support not available
    *** OPENJPEG (JPEG2000) support not available
    --- ZLIB (PNG/ZIP) support available
    *** LIBTIFF support not available
    *** FREETYPE2 support not available
    *** LITTLECMS2 support not available
    *** WEBP support not available
    *** WEBPMUX support not available
    --------------------------------------------------------------------
    To add a missing option, make sure you have the required
    library, and set the corresponding ROOT variable in the
    setup.py script.

The library reportlab actually depends on Pillow, and most of these are actually required/used by Pillow. But nevertheless it would be nice to have full support for images etc in Pillow (and by extension reportlab). So I'm going to describe below how to do that.

So You need to install libraries to add support for tkinter, jpeg, openjpeg, libtiff, freetype2, littlecms2, webp, and webpmux. But the reportlab install doesn't indicate what you need to install, i.e. the library package names that you need to type to correctly install these libraries.

I've listed below the commands you'll need to run to add support for these libraries for both Debian derived distributions that use apt-get (Ubuntu, Debian) and Red Hat derived distributions that use rpm or yum (Fedora, CentOS).

Fedora, CentOS

sudo yum install tk-devel tcl-devel

sudo yum install libjpeg-turbo-devel turbojpeg-devel openjpeg-devel

sudo yum install libtiff libtiff-devel

Ubuntu, Debian

todo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment