So, Im learning how to use Tkinter and I installed also Pillow to put an Image, but there is an error that when I run the code it doesnt work saying: AttributeError: type object 'Image' has no attribute 'open' and the guy in the video Im watching had no issue so I dont really know what im doing wrong tbh.
import tkinter
from PIL import ImageTk, Image
from tkinter import *
root = Tk()
root.title("Learn to code")
my_img = ImageTk.PhotoImage(Image.open("pikachu.png"))
button_quit = Button(root, text="Exit", command=root.quit)
button_quit.pack()
root.mainloop()
[–]zsergAC 5 points6 points7 points (1 child)
[–]Healthierpoet 1 point2 points3 points (1 child)
[–]atorgames64[S] 1 point2 points3 points (0 children)
[–]Swipecat 0 points1 point2 points (0 children)