小编Squ*_*all的帖子

Python PIL没有属性'Image'

我正在使用python2.6并且今天早上遇到了问题.它说"模块"没有属性"图像".这是我的意见.为什么我第一次不能使用PIL.Image?

>>> import PIL
>>> PIL.Image
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'Image'
>>> from PIL import Image
>>> Image
<module 'PIL.Image' from '/usr/lib/python2.6/dist-packages/PIL/Image.pyc'>
>>> PIL.Image
<module 'PIL.Image' from '/usr/lib/python2.6/dist-packages/PIL/Image.pyc'>
Run Code Online (Sandbox Code Playgroud)

python import python-imaging-library

26
推荐指数
3
解决办法
3万
查看次数

标签 统计

import ×1

python ×1

python-imaging-library ×1