Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django - how to Install Python Image Library (PIL)

I want to use the ImageField for forms and according to the documentation, it said I need to install the Python Imaging Library:

http://www.pythonware.com/products/pil/

It says that the current free version is PIL 1.1.7, so I decided to go for that. I am using Lubuntu (Linux) and the only Non-WindowsOnly installation is the

Python Imaging Library 1.1.7 Source Kit

so I decided to click and install that .tar.gz file. I know have the Imaging-1.1.7.tar.gz file in my downloads folder. Can someone tell me / show me a site which explains how I can now link it with Django? Where should I extract the file?

like image 225
SilentDev Avatar asked Oct 18 '25 05:10

SilentDev


1 Answers

How about Pillow: http://pillow.readthedocs.org/en/latest/

It is a fork of PIL, and Django supports if from 1.6, and prefers it over PIL. https://code.djangoproject.com/ticket/19934

pip install Pillow

Edit:

As @miki725 noted, it was working even before 1.6, but it has been "officially" supported since.

like image 54
frnhr Avatar answered Oct 19 '25 22:10

frnhr



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!