PDA

View Full Version : ImportError: No module named PIL



trotur
May 5th, 2007, 12:30 PM
I have a python script named ooo2-thumbnailer (it's copied from post http://ubuntuforums.org/showpost.php?p=466348&postcount=12).

When I run script in terminal, I get following error

Traceback (most recent call last):
File "./ooo2-thumbnailer", line 7, in <module>
from PIL import Image, ImageEnhance
ImportError: No module named PIL

Do I have to install something or how do I get PIL?
Please note that I haven't done any programming with Python (but Java instead is quite familiar). I would though like to have thumbnails in OpenOffice-files.

meng
May 5th, 2007, 01:57 PM
Try:
sudo apt-get install python-imaging

(or use whatever package management system you prefer)

trotur
May 5th, 2007, 03:18 PM
Thank you meng.
That solved my problem.

meng
May 5th, 2007, 09:35 PM
Pleased I could help. Good luck with Python.