Results 1 to 4 of 4

Thread: ImportError: No module named PIL

  1. #1
    Join Date
    Apr 2007
    Location
    Finland
    Beans
    33
    Distro
    Ubuntu 10.04 Lucid Lynx

    ImportError: No module named PIL

    I have a python script named ooo2-thumbnailer (it's copied from post http://ubuntuforums.org/showpost.php...&postcount=12).

    When I run script in terminal, I get following error
    Code:
    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.
    Last edited by trotur; May 5th, 2007 at 03:21 PM.

  2. #2
    Join Date
    Jan 2006
    Beans
    4,208
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: ImportError: No module named PIL

    Try:
    sudo apt-get install python-imaging

    (or use whatever package management system you prefer)

  3. #3
    Join Date
    Apr 2007
    Location
    Finland
    Beans
    33
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: ImportError: No module named PIL

    Thank you meng.
    That solved my problem.

  4. #4
    Join Date
    Jan 2006
    Beans
    4,208
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: ImportError: No module named PIL

    Pleased I could help. Good luck with Python.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •