Workaround to Easy Install PIL on Windows

2008 August 30
by Arun Bhai

This is a quick workaround for people who are using easy_install to install Python Imaging Library on Windows. Many people faced issues while doing this. I found a simple workaround for this.

You must have tried the following

C:> easy_install PIL
Searching for PIL
...
Finished processing dependencies for PIL
C:> python
Python 2.5.2 (r252:60911, Feb 21 2008, 13:11:45) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import Image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named Image

Now you will need to go to your site-packages directory (typically at C:\Python\Lib\site-packages) and change one line that starts with ./PIL-1.1.6-py2.5-win32.egg to simply ./PIL and change the sub-directory named similarly to PIL

Now your imports should work :smile:

Distantly Related posts:

  1. Decoding Google’s First Tweet in Python
  2. Work Faster in Windows With Launchy and a few Python Scripts
  3. A Nearly Perfect 404 Error Page in WordPress
  4. Making Python Scripts Show Windows-friendly Errors/Stacktrace
3 Responses leave one →
  1. Dushyant permalink
    September 1, 2008

    Hey.. have been goin thru ur blog since a couple of weeks now. Pretty interestin stuffin there. Gud work.. BTW I think u shd book a button on http://www.blogertize.in under the “Tech” segment. The content is quite rich.. So I think it’ll do u gud… Cheerz and keep up the gud work

  2. Toemmsn permalink
    November 22, 2009

    Thank you for this great tip! I’ve been trying to solve my problems with installation inside virtualenv for hours.

    Your tip helped me within a minute, so why didn’t it appear earlier in my search results ;-)

  3. niceguydave permalink
    February 4, 2010

    Thanks for tip! As someone new to Django/Python this really helped me.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

Additional comments powered by BackType