Python 3.3 with Pillow - ImportError: No module named 'Image'

Tsvetelina Borisova picture Tsvetelina Borisova · May 6, 2014 · Viewed 11.6k times · Source

I have this code:

import Image

import pygame, sys
from pygame.locals import *

pygame.init()

catImg = Image.open("cat.jpg")

I am using Python 3.3 and latest version of Pillow. But when I run this code I get:

ImportError: No module named 'Image'

I uninstall PIL. Can somebody help me?

Answer

famousgarkin picture famousgarkin · May 6, 2014

Seems you're using an incorrect import, try:

from PIL import Image

instead.