I am on Windows 10 and my python 3 code is as follows:
from tkinter import *
from PIL import ImageTk, Image
root = Tk()
root.title("Images")
root.iconbitmap("C:/Users/[name]/mu_code/GUI Practice/icon.ico")
# my_img = ImageTk.PhotoImage(Image.open("threat.jpg")
button_quit = Button(root, text="Exit Program", command=root.destroy)
button_quit.pack()
root.mainloop()
When I try to run this it gives the following error:
Traceback (most recent call last): File "c:\users[name]\mu_code\gui practice\images.py", line 2, in from PIL import ImageTk, Image ModuleNotFoundError: No module named 'PIL'
I have used pip install to download Pillow and attempted to download it to different locations to fix the problem but could not as the command prompt stated that the module was already downloaded. How can I fix this issue?
Edit:
import Image
or
import ImageTk
doesn't work either.
I have already run pip install Pillow and have one interpreter, being 'Mu'