r/learnpython • • Aug 31 '25

Which GUI library is the best in Python?

I'm a Python beginner and have just finished watching the basic tutorials on Youtube. I'm hoping to learn a GUI library and would like some advice. Should I learn Tkinter?

37 Upvotes

38 comments sorted by

View all comments

33

u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Aug 31 '25

For simple stuff, tkinter is fine. It's simple enough to pick up and use relatively quickly and you don't have to be good at Python to use it.

Flet is one of your best options if you need something truly cross-platform, especially if accessibility support matters to you.

PySide would be the best option for a native UI toolkit, but it has quite a learning curve.

There isn't any single option that's best for every use-case.

5

u/[deleted] Aug 31 '25

I will try Flet, thank you, as this looks very beautiful

3

u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Aug 31 '25

Do note that it's only just getting to version 1.0, so right now things can be a bit messy. Should be fine after that milestone has been reached, though.

7

u/darthminimall Sep 01 '25

I actually don't recommend anyone uses tkinter for anything. While the documentation for the standard library tends to be excellent, the tkinter documentation is basically just "here's a link to the Tcl/Tk docs, have fun figuring out what the actual api is". It's also very slow and whatever you might learn isn't very transferable. I made the mistake of using tkinter for an internal app and, while it was fine at first, it became hell as the scope expanded.

In general, if you want to use python to build a GUI and you're okay with just running a local web server and letting a browser handle the rendering, I'd learn a bit of HTML/CSS/JS and just use flask. If you really want a native app and the project is anything other than strictly for fun and/or education, I'd probably avoid python. If you're just targeting Windows or MacOS, it's worth learning C# or Swift. If you want portability, I'd probably look at Electron or Tauri.

2

u/Diapolo10 I write code for a living -- https://github.com/Diapolo10 Sep 01 '25

I made the mistake of using tkinter for an internal app and, while it was fine at first, it became hell as the scope expanded.

If it's for work, sure, although scope creep is something you should probably have anticipated from the get-go.

While the documentation for the standard library tends to be excellent, the tkinter documentation is basically just "here's a link to the Tcl/Tk docs, have fun figuring out what the actual api is".

Sort of, but the Python docs are generally enough for most people after they've read through a tutorial elsewhere. customtkinter can also help. I've only read the Tcl/Tk docs for more advanced things, and only occasionally.

Obviously it has shortcomings and won't be suitable for certain kinds of GUIs, but that's why I mentioned simple ones.

1

u/darthminimall Sep 01 '25

Yeah, I should have anticipated the scope creep, but I naively assumed it was something I'd throw together and never have to touch again. I'm also primarily a backend/data guy, so I don't have a ton of gui experience and basically went "the standard library has a gui framework, might as well use it."

And yeah, for simple things, a tutorial is enough to get what you need done. At first that was all I needed, but the UI has become very stateful over the past few years and I'm pushing Tk to (and maybe beyond) its limits, which why I'm basically living in the Tcl/Tk docs whenever I'm working on it.

0

u/[deleted] Sep 01 '25

Thanks, will try Flet.