I’m trying to built a User Interface for my Python Script in Jupyter Notebook.
When I try to execute this simple example
import tkinter
window = tkinter.Tk()
window.title(‘GUI’)
label = tkinter.Label(window, text = “Hello World!”).pack()
window.mainloop()
I get the following Error:
TclError: no display name and no $DISPLAY environment variable
So my question is: Is it possible to use tkinter in SWAN? And if so, does anyone have an idea how to solve the error?
Thanks a lot for your answer. I was also thinking of ipywidgets which works well!
Why I asked for tkinter is that people without programming background will have access to the tool and I would prefer if they wouldn’t have to scroll through the code until they see the widgets appearing below. But of course that’s not necessary at all, would just be nice-to-have. I will proceed with ipywidgets unless somebody has a solution for tkinter.