I encounter this problem when I install PIL-1.1.7 on my 64-bit Windows 7 platform.
Run the following command in administrator mode, and the problem fixed:
reg copy HKLM\SOFTWARE\Python HKLM\SOFTWARE\Wow6432Node\Python /s
Thanks to the first comment under the answer .
pip install Pillow to install PIL instead of using the official binary setup file for Windows, because the official site only provide a 32-bit version, the _imaging library will not work on Windows 64-bit platform.