ImportError: No module named PIL

11 Oct 2009

After server re-install a Plone website failed to start:

2009-10-11T13:45:56 ERROR Application Could not import Products.ATContentTypes
Traceback (most recent call last):
  File "/data/user/site/parts/zope2/lib/python/OFS/Application.py", line 709, in import_product
    product=__import__(pname, global_dict, global_dict, silly)
  File "/home/apc/ecc/parts/plone/ATContentTypes/__init__.py", line 64, in ?
    import Products.ATContentTypes.content
  File "/home/apc/ecc/parts/plone/ATContentTypes/content/__init__.py", line 26, in ?
    import Products.ATContentTypes.content.link
  File "/home/apc/ecc/parts/plone/ATContentTypes/content/link.py", line 39, in ?
    from Products.ATContentTypes.content.base import registerATCT
  File "/home/apc/ecc/parts/plone/ATContentTypes/content/base.py", line 63, in ?
    from Products.CMFPlone.PloneFolder import ReplaceableWrapper
  File "/home/apc/ecc/parts/plone/CMFPlone/__init__.py", line 215, in ?
    from browser import ploneview
  File "/home/apc/ecc/parts/plone/CMFPlone/browser/ploneview.py", line 12, in ?
    from Products.CMFPlone import utils
  File "/home/apc/ecc/parts/plone/CMFPlone/utils.py", line 5, in ?
    from PIL import Image
ImportError: No module named PIL

The Plone applications is using PIL library to process images, thanks to Dag repository it is really easy to install PIL on on CentOS/RHEL/Fedora systems:

yum install python-imaging