Skip to content

Instantly share code, notes, and snippets.

@fernandojunior
Created October 15, 2014 08:08
Show Gist options
  • Save fernandojunior/17b027e3d5996721abe3 to your computer and use it in GitHub Desktop.
Save fernandojunior/17b027e3d5996721abe3 to your computer and use it in GitHub Desktop.
Scripts to install Pillow on ubuntu
#!/bin/bash
# Script to install Pillow dependencies on Ubuntu based on
# https://pillow.readthedocs.org/installation.html#linux-installation
# http://askubuntu.com/questions/507459/pil-install-in-ubuntu-14-04-1-lts
# http://stackoverflow.com/questions/2967224/gcc-error-trying-to-install-pil-in-a-python2-6-virtualenv
# By Fernando Felix do Nascimento Junior
# become superuser
sudo su
# pay attention the python dev version ... if you'll use python 2.6, then install python2.6-dev
apt-get install python-dev python-setuptools -y
apt-get install build-dep python-imaging -y
# Pillow dependencies
apt-get install libtiff4-dev zlib1g-dev libfreetype6 libfreetype6-dev tcl8.5-dev tk8.5-dev python-tk -y
# Prerequisites for ubuntu 10.04 LTS
apt-get install libjpeg62-dev -y
# Prerequisites for ubuntu 12.04 LTS
apt-get install libjpeg8-dev liblcms2-dev libwebp-dev -y
# cause the shell to exit super use mode
exit
# install Pillow with pip
pip install Pillow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment