先确保下载了PILpython
树莓派上code
sudo apt-get install python-imaging
还报错的话get
把class
import Image
改为import
import PIL.Image