14π
You should install the libraries that others recommended but most importantly you should tell PIL where to find them. Edit the setup.py so that
JPEG_ROOT = None
becomes
JPEG_ROOT = libinclude("/usr/lib")
I found that the easiest way was to download the source with pip but not install:
pip install --no-install PIL
edit the setup (inside the build directory of the virtual environment) and the install
pip install PIL
you can find some more information in my blog
You can also try pillow which seems to do great job with little hassle (pip install pillow)
10π
On Ubuntu precise, PIL doesnβt find the jpeg library files, even once they are installed. The easiest way to fix this is to make a symlink after you have installed the jpeg dev package.
So, I needed an extra step:
pip uninstall PIL
sudo apt-get install libjpeg8-dev
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
pip install PIL
8π
For Ubuntu 11.04, what finally worked for me is:
pip uninstall PIL
sudo apt-get install libjpeg8-dev
pip install PIL
The Python Imaging Library (PIL) seems really picky about version and location of the jpeg libraries. And because PIL is written in C and compiled, you need the development versions of the library in addition to the runtime versions.
The situation is so bad the community forked PIL to create a softer version: Pillow:
http://pypi.python.org/pypi/Pillow#why-a-fork
- How can I easily convert a Django app from mySQL to PostgreSQL?
- Django template rows of multiple items
- 'QuerySet' object has no attribute ERROR, trying to get related data on ManyToMany fields
6π
On OSX, I used the following binary to get libpng and libjpeg simultaneously installed systemwide:
Because I already had PIL installed (via pip on a virtualenv), I ran:
pip uninstall PIL
pip install PIL --upgrade
This resolved the decoder JPEG not available
error for me.
- Django aggregate Count only True values
- Can I detect if my code is running on cPython or Jython?
- How to use full_clean() for data validation before saving in Django 1.5 gracefully?
3π
You must install the libraries:
sudo aptitude install libjpeg62 libjpeg62-dev zlib1g-dev
- Django: Tweaking @login_required decorator
- Django & the "TemplateDoesNotExist" error
- Django-allauth, JWT, Oauth
- How to upgrade sqlite 3.8.2 to >= 3.8.3
- Django: Heroku Failing to launch, at=error code=H10 desc="App crashed"
- Django β Delete file from amazon S3
- Trying to pass a QuerySet as initial data to a formset
- Database trouble in Django: can't reset because of dependencies
- Django. Error message for login form