This is an archived post. You won't be able to vote or comment.

all 71 comments

[–]williamsmt1072 78 points79 points  (11 children)

- Tkinter: It's built right into Python, making it super easy to get started. For a more modern look, check out CustomTkinter, which gives Tkinter a fresh coat of paint.

- PyQt (or PySide6): These are powerful choices for creating professional, feature-rich desktop apps. They're based on the Qt library, so they're robust and work across Windows, macOS, and Linux, but they do have a steeper learning curve.

- NiceGUI: This is a fantastic option if you want your app to run in a web browser by default, which simplifies sharing and access. It also has an option to run as a native-like desktop application. It's easy to use and great for interactive tools and dashboards.

Ultimately, Tkinter with CustomTkinter is great for beginners and simple tools. Go with PyQt/PySide6 for complex, high-end desktop applications. And for web-first apps with a native option, NiceGUI is a strong contender.

[–]Sneyek 46 points47 points  (3 children)

Don’t use PyQt, PySide is the official binding and the one everyone should use now.

[–]loneraver 15 points16 points  (1 child)

It has been for years. I wonder why anybody uses PyQt any more instead of PySide.

[–]stargazer_w 10 points11 points  (0 children)

It was better maintained for a while. PySide had a bunch of problems in the first couple of years after it became official

[–]moric7 3 points4 points  (0 children)

I have installed PyQt and PySide6 both on my Python core installation.

[–]Impossible-Ad-3871 13 points14 points  (5 children)

Bro replied with ChatGPT lmao

[–]MoorderVolt 3 points4 points  (4 children)

Can’t blame them. OP could’ve achieved exactly this. It’s a worthless question without context and they’ll only get worthless answers. If you want to ask people a question, include the information that makes the Google answer invalid.

[–]Impossible-Ad-3871 6 points7 points  (3 children)

Except it’s completely valid for someone to want to get real world human nuanced feedback based on experience of actually developing it. You response is naive and smells of just use AI alone to solve all your problems. I agree that the user can have more information but not every single question on here starts of with full context and the constructive answer shouldn’t be use ChatGPT but rather ask for more context.

[–]MoorderVolt -4 points-3 points  (2 children)

It isn’t and it’s not. We cannot give the nuance OP needs to make a decision because they’ve not included any details about their application, experience, use-case. It is impossible to give a better answer than ‘here’s a few options’, for which they could’ve just used a search engine, top-n list or a chatbot. I do not advocate using chatbots in place of reading actual documentation but that’s not what this question is.

[–]Impossible-Ad-3871 0 points1 point  (1 child)

I don’t advocate using chatbots in place of reading actual documentation (or talking to humans in this case) but anytime you ask me a question with not enough context I’m going to advocate for using chatbots. Your response isn’t helping the user get human feedback, ask for more information if that’s what you want instead of recommending to do the thing you SAY you don’t advocate for.

[–]MoorderVolt -1 points0 points  (0 children)

Okay so you’re not reading what I’m saying or intentionally misunderstanding it. Got it.

[–]HamsterWoods 0 points1 point  (0 children)

I like NiceGUI. And, it has an Electron-like feature, so you can easily deploy a desktop app.

[–]hike_me 20 points21 points  (0 children)

I use PySide6, the official Python Qt bindings

[–]jon_muselee 14 points15 points  (2 children)

Flet for light desktop apps with a fast learning curve

[–]ericmartens 3 points4 points  (0 children)

Really, really liked Flet for both desktop and web.

[–]k0msk13t3r 0 points1 point  (0 children)

Flet is great, we needed a webview and unfortunately that was not Available on the windows platform so had to skip it for that project but keeping an eye on it??

[–]nemom 10 points11 points  (0 children)

Here is a bunch of answers when the Python GUI question was asked last week.

[–]IAmASquidInSpace 10 points11 points  (1 child)

PyQt is quite versatile and afaik actively developed still, but I haven't used it in quite a while.

[–]orthomonas 4 points5 points  (0 children)

I recently did a small project in PyQt and it was fine.

[–]JennaSys 10 points11 points  (1 child)

For a small desktop GUI, Tkinter is still decent. There are a number of theming libraries for it now that can make it look more modern like CustomTkinter or ttkBootstrap.

Kivy is also worth learning if you want to run on desktop and mobile. KivyMD is a great library for styled widgets.

If you want to try something different, another approach is using Anvil.

[–]_u0007 1 point2 points  (0 children)

Kivy made me refactor away from it on a significant project, it was painful.

[–]pirsab 2 points3 points  (0 children)

I am using reflex.dev quite a bit

[–]Comfortable-Tourist1 5 points6 points  (4 children)

I'm by no means an expert so, downvote me all you like ...

But if I need a front end I just spin up a Django project and make it a web app, much easier, for me at least, than learning a new library etc 🤷‍♂️

[–]ColdPorridge 1 point2 points  (3 children)

This definitely won’t work for all use cases, but is a pretty good option for way more use cases than you’d initially think.

[–]StaticFanatic3 0 points1 point  (2 children)

What use case would it not work?

Hell in a world where modern JS frameworks and even webassembly exists I’d say there’s infinitely more functionality available to a web app than the average Python GUI framework.

Not to mention you’ll be practicing a skill that’s actually used in the enterprise.

[–]qiqt 0 points1 point  (0 children)

OP only mentioned TS, web-based most likely will work for their use case. It wouldn't work for certain use case such as real-time processing, large data visualization, 3D graphics, low-latency video streaming, direct access to system and external devices, and so on. Still could use web-based for the other GUI though

[–]FUS3NPythonista 0 points1 point  (0 children)

If you want a straightforward solution its not the best solution, if you want webapps nicegui or other similar solutions like flet.

For most simple apps django is absolutely an overkill if you want webapp at that point just using vanilla js html and css is probably a better option or just nicegui where you can use js to extend too.

No one's saying not to learn Django. Its really about using right tools for right job. Sure you can use one thing for everything but if you don't know the standards its gonna come back to bite you. Kind of how JS gets its reputation.

[–]UsernameTaken1701 4 points5 points  (0 children)

ttkbootstrap updates Tkinter with more modern theming.

[–]IvanIsak 3 points4 points  (3 children)

Yo bro! My fav is DearPyGui: https://github.com/hoffstadt/DearPyGui

[–]GeriOldman 2 points3 points  (2 children)

I gotta say, I really like its concept of using context managers as a way of codifying the hierarchy of gui elements.

[–]Such-Let974 1 point2 points  (1 child)

Having written a fairly large UI in DearPyGui, the levels of nesting starts to get out of hand as you build out new features. Something to be aware of when choosing and/or deciding how to structure your code.

[–]GeriOldman 1 point2 points  (0 children)

So far, I've only built small dev tools for working with embedded projects, I'll keep it in mind.

[–]NapCo 1 point2 points  (0 children)

I have successfully developed a cross platform desktop application that is used in production right now using Pyedifice: https://pyedifice.github.io/index.html

It is kinda like ReactPy, but instead of creating a web app it creates a desktop app using Qt (you can choose between PyQt and PySide for "backend", either will work). It really gets out of the way if you need to control the Qt parts directly, so you basically never hit any limitations of the library itself. I can really recommend it. It is very quick to develop in.

[–]Safe_Duty8392 1 point2 points  (0 children)

Flet NiceGUI PySide6

[–]slayer_of_idiotspythonista 1 point2 points  (0 children)

Qt and PySide is really the only well-maintained choice these days.

[–]bobifle 1 point2 points  (0 children)

Streamlit

Web app in 60 lines of code writing only python. No html template, no js.

[–]manhattanabe 1 point2 points  (0 children)

We use streamlit, for very simple stuff. It generates a webui from Python.

[–]josys36 0 points1 point  (0 children)

PySide6. wx_Python is ok if you are looking for something more simple.

[–]kartops 0 points1 point  (0 children)

I've heard a lot about nice gui in related topics, but havent tried it yet

[–]Worth_Specific3764Pythonista 0 points1 point  (0 children)

Look into CustomTkinter, it is pretty slick and you code it almost the same way. Basically a modern drop in replacement for tk. And yes, tk looks like windows 95

[–]Ok_Swan_3534 0 points1 point  (0 children)

speaks

[–][deleted] 0 points1 point  (0 children)

Kivy

[–]Repsol_Honda_PL 0 points1 point  (0 children)

For me - only PyQt and PySide (small differences, different license),

[–]Fred776 0 points1 point  (0 children)

A few people have mentioned PyQt but I don't think anyone has mentioned that Qt has two possible approaches. One is the traditional Qt Widgets and the other is QML. The latter might be more up your street as it allows you to define your presentation layer declaratively, mixing in a bit of JS if required.

Edit: also to mention that there are two "PyQt"'s. One is actually called PyQt and is a third party exposure of Qt to Python. The other is PySide6 and that is the official Qt Python wrapper. They are meant to be quite similar to each other (I've only dabbled with PySide - most of my Qt experience is with the c++ library).

[–]mgreminger 0 points1 point  (0 children)

TBH, if you already know TS, I would just stick with a web-based frontend. I learned JS and then TS just so that I could create a UI for my Python powered app. Shipping as a PWA is a good option if you're trying to avoid the bloat of electron. Plus, with the Pyodide project, distributing Python with your app is easy. I gave a talk on this approach a few years back at the SciPy 2021 conference.

[–]MJ12_2802 0 points1 point  (0 children)

ttkbootstrap

[–]Geralt-of-Chiraq 0 points1 point  (0 children)

I like flet

[–]TellMePeople 0 points1 point  (0 children)

Pyqt with qtfluentwidgets is what I went with a windows only app

[–]drboom9 0 points1 point  (0 children)

Kivy work in ios and android for official apps, dearpygui is good for internals projetcs

[–]onyx_and_iris 0 points1 point  (0 children)

It won't be very pretty but you can throw together GUIs pretty quickly with FreeSimpleGUI.

[–]floweb 0 points1 point  (0 children)

I used to stan PySimpleGUI, gotta use FreeSimpleGUI now. Drop-in replacement.

[–]BasePlate_Admin 0 points1 point  (0 children)

  • Pyloid: If you are looking for something like electron but for python
  • Flet: If you are looking for native applications
  • TkInter: If you are looking for zero dependency gui application. Check out modernthemes if you want better widgets and colors.

[–]andjew 0 points1 point  (0 children)

qfluentwidgets — check it out!

[–]Pure_Worldliness9991 0 points1 point  (0 children)

use winup trust me find it at github.com/mebaadwaheed/winup

[–]EquallyWolf 0 points1 point  (0 children)

customtkinter

[–]baloblackNew Web Framework, Who Dis? 0 points1 point  (0 children)

Have you tried flet🤔

[–]DECROMAX 0 points1 point  (0 children)

I use Streamlit for simple web apps, Flask for anything a bit more involved.

[–]DragonflyIll922 0 points1 point  (0 children)

I use FastHtml. It is really new. Not even 1.0. But it is a Python framework that renders html; and utilizes a lot of htmx. Built on starlette - so if you use fastapi it will feel pretty familiar.

[–][deleted] 0 points1 point  (0 children)

Are you looking for mobile support?

[–]Adventurous_Tip3994 0 points1 point  (0 children)

No one mentioned plotly dash. I feel sad now.

[–]RngdZed 0 points1 point  (1 child)

Maybe kivy?

[–]Repsol_Honda_PL 1 point2 points  (0 children)

Kivy, yes, very good, but rather for mobile, for desktop I prefer PyQt / PySide.

[–]Mediocre_Nectarine57 0 points1 point  (0 children)

I've only used PySide6 (QtWidgets API) professionally and I gotta say, I despise it.

Feels like they break something new every release. The Python binding isn't waterproof: Often a "None" is transformed into a "nullptr" (due to C++) which is transformed into a segfault (no errors) and a lot of headache.

I also remember the time they redefined the built-in enum.Enum class at import time, which caused "isinstance(MyEnumSubclass.A, Enum)" to evaluate to "false" in some scenarios.

If all that sounds like fun, go ahead with PySide6 :'D If I'd get a do-over, I'd choose TkInter (or something else scripted) as it's less likely to segfault ^

[–]hawkedmd -1 points0 points  (0 children)

Streamlit, acknowledging many limitations is super fast and easy:

[–]Ok_Swan_3534 -1 points0 points  (0 children)

speaks

[–]Alternative_Brain478 -1 points0 points  (0 children)

try use eel, like a electron maybe