为什么我会得到ImportError:没有名为'PIL'的模块?
问题描述:
import sys
from PIL import Image
........
MY_IMAGE = Image.open(sys.argv[1]).convert('1')
我应该先指定目录吗?我也尝试过:
Should I first specify directory? I also tried:
import Image
img = Image.open("/directory/image.jpg")
img.load()
它没有帮助,我仍然得到ImportError:没有命名的模块'PIL'
It does not help, I still get ImportError: No module named 'PIL'
答
试试这个链接: http://www.youtube.com/watch?v=ssQAFIQ4oBU
您需要先安装PIL
Try this link: http://www.youtube.com/watch?v=ssQAFIQ4oBU You need to install PIL first