小编Clo*_*ork的帖子

class Image没有属性'open'

可能重复:
img = Image.open(fp)AttributeError:class Image没有属性'open'

所以我试图用tkinter在python中查看图片.我安装了PIL并且我正在尝试打开图片但是我一直收到一个属性错误,说"类图像没有属性'打开'

from __future__ import division
from PIL import Image
from Tkinter import *
import random

img = Image.open("majestic creature.jpeg").convert("RGB")
Run Code Online (Sandbox Code Playgroud)

这不是我的所有代码,但这是程序似乎遇到麻烦的部分.

python tkinter python-imaging-library

6
推荐指数
1
解决办法
1万
查看次数

标签 统计

python ×1

python-imaging-library ×1

tkinter ×1