How to install PIL from ZIP, JPEG, etc. On Ubuntu 11.10
I am trying to import png, which I believe is from PIL. I would also prefer JPEG and others to work as well
I am running Ubuntu 11.10.
now from http://jj.isgeek.net/2011/09/install-pil-with-jpeg-support-on-ubuntu-oneiric-64bits/
I figured out a few things.
I tried
$ sudo apt-get install libjpeg libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
pip install PIL
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so /usr/lib
sudo ln -s /usr/lib/x86_64-linux-gnu/libz.so /usr/lib
pip install -U PIL
where all his / her JPEG, ZLIB, FREETYPE2 were supported by my support not installed
I also went to How do I install PIL on Ubuntu 11.04? and I tried sudo apt-get install python imaging
and then through the whole setup.py and
selftest.py` but still it didn't work
I kept using the jpeg of the PIL encoder is not available . I downloaded the source files from pythonware.com and went to usr / lib using mv then according to stackoverflow instructions I tried to add a line after line 213:
add_directory(library_dirs, "usr/lib")
sudo python setupt.py install
python selftest.py
but JPEG, ZLIB, FREETYPE2 were not supported, but now there is another line that said support for LITTLECMS is not installed.
Please help me figure it out.
source to share
The repository versions work fine for me 11.10. Have you used:
sudo apt-get install python-imaging
Note the dash between python and image where you have a space. You don't need to manually trigger setup.py
or any of these locks unless for some reason you need to build from source. PNG should work out of the box.
source to share
On Ubuntu 12.04 I resolved the issue caused by the "canonical" comment http://effbot.org/zone/pil-decoder-jpeg-not-available.htm
- Manually loaded PIL
- Changed JPEG_ROOT to point to jpeg lib location: / usr / lib or / usr / lib / i 386-linux-gnu on x86 and / usr / lib / x 86_64-linux-gnu on x64
- Cleaned up project (if already built) with python setup.py clean --all
- On x86 and x64 I found that _imagingmath.so and _imaging.so where in the / usr / local / lib / python 2.7 / dist-packages directory AND also in / usr / local / lib / python 2.7 / dist -packages / PIL ... I removed the first ones because they were loaded before the PIL distribution.
- python setup.py build
- installing python setup.py
This was in the context of using the Django / Mezzanine CMS.
source to share
None of these worked for me, Ubuntu 14.04. I had to compile everything from source, but I have to say this was the sweetest of them all. No mistakes. Download from the following links and follow the various READMEs. Make sure you follow the root instructions. Download and install JPEG from http://www.ijg.org/ . Download and install PNG from http://www.zlib.net/ . Download and install Freetype from http://download.savannah.gnu.org/releases/freetype/ .
Download and install PIL from http://www.pythonware.com/products/pil/ . In this last step, make sure that in the readme file you can see the ones that are set correctly during
python setup.py build_ext -i
In some cases, the following command might tell you something else, but ignore it. python selftest.py
Greetings. : -)
source to share