use 'from PIL import Image' instead of 'import Image'