0

I try to install Lecos plugin, which requires python imaging library (pil), but the installation fails with the following: "you need to have the image library pil installed"

I installed the python-pillow library instead of the pil library: pil is almost dead and I can't find it in fedora repositories so i suppose it has to be build from source. Pillow is the "new pil" library and using pillow the command "from PIL import ModuleX" does work from the qgis python console, but Lecos plugin installation still fails.

Is there a way to get Lecos recognize pillow library, or do I have to install the outdated pil library ?

thanks for your help

0

huh, didn't know that there is a successful fork of PIL. According to this source on the fedoraproject the problem is that it is not possible anymore to import PIL modules via import Image as LecoS does. Thus it throws an ImportError and report that PIL is not installed.
You should try to install pillow and download LecoS. Then go into the plugins folder (~/.qgis2/python/plugins/LecoS) and open the file landscape_polygonoverlay.py. On Line 49 you have to insert from PIL import Image, ImageDraw in order to be analogous with Pillow.

I haven't tested that out as I am using Debian as distribution (thus staying with conservative libraries a bit longer), but it hopefully should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.