from tkinter import *  root = Tk() photo = PhotoImage(file = "image.png") root.iconphoto(False, photo)

Read more of this post