Skip to main content

Pimp My Pillow will install a fully working Pillow distribution, no more 'decoder * is not supported' messages!

Project description

PyPI Package latest release PyPI Package monthly downloads PyPI Wheel

Pimp My Pillow will install a fully working Pillow distribution. No more ‘decoder * is not supported’ messages!”

  • Free software: GPL V3 license

Installation

On Debian/Ubuntu distributions you need to install libyaml-dev before running python setup.py install.

To install it from sources do:

[foo@host]$ git clone https://github.com/edvm/pimp-my-pillow.git
[foo@host]$ cd pmp; python setup.py install

To install it from PyPi do as root:

[foo@host]# pip install pimpmypillow

Or using a virtualenv will work too:

(project)py2@089b711eb21b:~/$ pip install pimpmypillow

Usage

PMP can output the needed commands that need to be run in the console to install Pillow without installing anything in the system. To do this use the ‘install’ option with the ‘–drymode’ argument, for example:

(project)py2@089b711eb21b:~/$ pmp install --drymode
Run the following command as root to install needed dependencies:
su -c "apt-get install -y tk-dev libjpeg-dev zlib1g-dev libtiff5-dev libfreetype6-dev liblcms2-dev libwebp-dev libtk-img-doc libopenjpeg-dev python-dev gcc cmake"

To have jpeg support, run as root the following script:
su -c "/opt/py2/.virtualenvs/project/lib/python2.7/site-packages/pmp-0.1.0-py2.7.egg/pmp/scripts/install-openjpeg.sh"

Finally install Pillow with the following command:
/opt/py2/.virtualenvs/project/bin/pip install Pillow

(project)py2@089b711eb21b:~/$

If you want pmp install Pillow in the system, run it as root like:

[foo@host]# pmp install

To get pmp command help do:

[foo@host]$ pmp --help

To have openjpeg support, please install pmp/scripts/install-openjpeg.sh by hand, like:

[foo@host]$ cd pmp/scripts/
[foo@host]$ chmod +x ./install-openjpeg.sh; ./install-openjpeg.sh

IMPORTANT NOTE: If you have installed Pillow before installing’pmp’, you will need to:

1- Uninstall Pillow
[foo@host]$ pip uninstall Pillow
2- Install pmp
[foo@host]$ pip install pmp
3- Use pmp
[foo@host]$ pmp install --drymode

When using ‘pmp’, you should end with a full powered pillow installation like:

*** TKINTER support not available
--- JPEG support available
--- OPENJPEG (JPEG2000) support available (2.1)
--- ZLIB (PNG/ZIP) support available
--- LIBTIFF support available
--- FREETYPE2 support available
--- LITTLECMS2 support available
--- WEBP support available
--- WEBPMUX support available

Now pray the gods so someone invite me a beer.

Documentation

Currently supported Gnu/Linux distributions are:

  • Debian 7

  • Debian 8

  • Ubuntu 14.10

  • Ubuntu 15.04

  • Archlinux

Give support for other Gnu/Linux distributions is really easy! This library use yaml files to know which package should install, please take a look at pmp/settings/debian.yml or pmp/settings/ubuntu.yml. It uses one yaml file per gnu/linux distribution. At each yaml file, keys are distro versions.

Help me support more distros

If when installing your distro is still not supported, you will get a traceback like folows:

(virtualenv) root@180121250ef0:/opt/pimp-my-pillow# pmp --help
usage: pmp [-h] [--interactive] install
Pimp My Pillow
positional arguments:
  install        Install Pillow
optional arguments:
  -h, --help     show this help message and exit
  --interactive  Non interactive
(bombear) root@180121250ef0:/opt/pimp-my-pillow# pmp install
Traceback (most recent call last):
  File "/opt/envs/bombear/bin/pmp", line 9, in <module>
    load_entry_point('pmp==0.1.0', 'console_scripts', 'pmp')()
  File "/opt/pimp-my-pillow/src/pmp/__init__.py", line 164, in main
    stderr, stdout = install_pillow(args_.interactive)
  File "/opt/pimp-my-pillow/src/pmp/__init__.py", line 97, in install_pillow
    install_pillow_dependencies(interactive)
  File "/opt/pimp-my-pillow/src/pmp/__init__.py", line 59, in install_pillow_dependencies
    conf = get_gnu_linux_distro_conf()
  File "/opt/pimp-my-pillow/src/pmp/__init__.py", line 50, in get_gnu_linux_distro_conf
    raise Exception("Unknown Gnu/Linux distribution.")
Exception: Unknown Gnu/Linux distribution.

Its really easy to add support for your Gnu/Linux distro and version:

1- cat the content from /etc/issue, for ex:

[edvm@edvm-laptop pimp-my-pillow (master)]$ cat /etc/issue
Ubuntu 15.04 \n \l

[edvm@edvm-laptop pimp-my-pillow (master)]$
2- Copy and paste a sample setting file, for example:

https://github.com/edvm/pimp-my-pillow/blob/master/src/pmp/settings/ubuntu.yml

3- The ‘etc-issue’ value must be the content from your /etc/issue (without the n l)

4- Put your setting file (it must end with .yml and must be a valid yaml file) with the other settings and send the new file you created as a PR! :D

Be sure to have yaml-devel, python-devel, python-pip and gcc installed

Changelog

0.1.2 (2015-10-09)

  • Archlinux support implemented by Angel Velasquez

  • Fixes in documentation

0.1.0 (2015-03-20)

  • First release on PyPI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pimpmypillow-0.1.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

pimpmypillow-0.1.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file pimpmypillow-0.1.2.tar.gz.

File metadata

File hashes

Hashes for pimpmypillow-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b9c2021f56e1c6dac39af2feef926575e0213f283263720fe0c34a70e71db6ae
MD5 8b5afae67a44749f44542e5bffed5787
BLAKE2b-256 269e48a90270f7c96d0e821ec5880b8d28c89e3a79a78b5820536c9f5c202d7c

See more details on using hashes here.

File details

Details for the file pimpmypillow-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pimpmypillow-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 96befb53062851668791db30dbfc42b839a1c928eb87823357ec4f5347112e35
MD5 669ad7c07b4a6380236cc7f004c1031f
BLAKE2b-256 7906fe649feb197769e17487496821ff0179acde8a2aafa62e3ac894e7a1b80e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page