42π
There are several cases with PIL which lead to a similar experience.
If you have installed PIL out of a virtualenv using
pip install PIL
Then you should have installed the dev versions of libjpeg, libz before.
Assuming youβre on a Ubuntu box, a
pip uninstall PIL
apt-get install libjpeg-dev zlib1g-dev libpng12-dev
pip install PIL
should suffice. You could also install Pillow instead of PIL, it works better with setuptools and can be installed in a virtualenv.
7π
I found this worked fine for me:
pip uninstall PIL
pip install Pillow
then I restarted the server:
kill -HUP XXX
where XXX is the process ID of the your server process.
- Django β How to send a success message using a UpdateView CBV
- Django-allauth, JWT, Oauth
- Django collectstatic no such file or directory
- What's the purpose of Django "deconstruct" model field function?
5π
I was already using Pillow
and got the same error.
Tried installing libjpeg
or libjpeg-dev
as suggested by others but was told that a (newer) version was already installed.
In the end all it took was reinstalling Pillow
:
sudo pip uninstall Pillow
sudo pip install Pillow
0π
In case you are using Fedora, please do, before doing a pip install Pillow:
yum install libjpeg-devel zlib1g-devel libpng12-devel
- What does request.GET.get mean?
- TypeError: create_superuser() missing 1 required positional argument: 'profile_picture'
- How to use select_related with GenericForeignKey in django?
- Django- getting a list of foreign key objects
- Django no csrftoken in cookie