web2py and PIL: The _imaging C module is not installed

535 views
Skip to first unread message

lesssugar

unread,
Oct 20, 2013, 7:58:29 AM10/20/13
to
I'm trying to use web2py slice to make images thumbnails:


The script worked fine with web2py 2.4.7. When upgraded to 2.7.4, I get this on image upload:

 File "[path]/PIL/Image.py", line 37, in __getattr__
    raise ImportError("The _imaging C module is not installed")
ImportError: The _imaging C module is not installed

I have PIL in my modules folder. I tried both import Image and from PIL import Image.

Both import Image and import _imaging commands work fine in python interpreter (no errors at all). So if the interpreter does not see an issue, why I'm having problems with the newest web2py?

Any suggestions are more than welcome.

Leonel Câmara

unread,
Oct 21, 2013, 12:58:25 PM10/21/13
to web...@googlegroups.com
Remove PIL from your app modules folder and just add it to your python installation by simply installing it.

I would also recommend going with pillow instead of regular PIL as they fixed quite a lot of very old bugs.

You can get a windows pillow version here:

Afterwards, restart web2py and you should be good to go.
Reply all
Reply to author
Forward
0 new messages