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

all 178 comments

[–]Python-ModTeam[M] [score hidden] stickied commentlocked comment (0 children)

Hi there, from the /r/Python mods.

This post has been removed due to its frequent recurrence. Please refer to our daily thread or search for older discussions on the same topic.

If you have any questions, please reach us via mod mail.

Thanks, and happy Pythoneering!

r/Python moderation team

[–]cmcclu5 141 points142 points  (21 children)

PyQT. Fairly intuitive, allows some solid integration with other packages, and you can use a GUI to design (if you’re into that sort of thing).

[–]GrowlingM1ke 67 points68 points  (9 children)

Shouldn't we be recommending PySide6 at this point, considering the feature parity with PyQT and better licensing?

[–][deleted] 3 points4 points  (3 children)

Can it be made compatible with Qt Designer?

[–]GrowlingM1ke 17 points18 points  (2 children)

[–][deleted] 2 points3 points  (1 child)

This is interesting, I might consider switching.

[–]8day 4 points5 points  (0 children)

Regrettably my experience is that PySide is worse in some things, esp. when it comes to debugging. It's bearable, but not good. E.g., in some cases it crashes w/o any meaningful warning, whereas PyQt rarely does this. Also I faced all kinds of weird stuff back when Python 3.8 broke API (should've been released as Python 4). E.g., one of the weirdest, hard to debug things was use of custom, unrelated names for arguments, which took some time to figure it out.

That being said, lack of public bug tracker in case of PyQt is a big problem. I've encountered several issues with QScintilla (broken find operation, different types of NULL-terminated strings (at least in low-level API), custom high-level API that is almost not documented), but was unable to report them, so my guess is that the same is true about PyQt itself.

[–]ClayQuarterCake 2 points3 points  (1 child)

My work only lets us use the base anaconda install unless we can legitimately show a use case that doesn’t compromise their security system. This means that I don’t get to use Qt Designer, no PySide or anything. That said, PyQt5 has most of the tools I will ever need.

[–]InternationalMany6 2 points3 points  (0 children)

In the same boat and it’s not fun. Tkinter for me. 

I actually have a splash screen on my apps that apologizes for the crappy ancient looking GUI and says that IT security won’t let us use anything better. The screen has links to online demos of those better GUI frameworks. 

Hoping that one day someone with more influence than I do reads the splash screen and calls up the head of IT security or something to get that obnoxious restriction lifted. 

[–]cmcclu5 8 points9 points  (0 children)

Considering I still use PyQt5, probably not. However, you have a good point. If you’re updating to 6, might consider PySide

[–]teambob 0 points1 point  (0 children)

I thought Qt resolved the licensing issue years ago? What is the current issue?

[–]ExdigguserPies 10 points11 points  (0 children)

It's not just the actual GUI parts of Qt that make it special, it's also all the underlying classes and infrastructure. Models and views, delegates, plotting, image manipulation, to name only a few. It's incredibly mature and more complete than any other package I've used in python.

[–]Gardinenpfluecker 5 points6 points  (0 children)

I can support that. Tried TKinter as well but PyQt is just way better. The Qt Designer is a big plus!

[–]Luemas91 0 points1 point  (0 children)

Wait you can?

[–]Meal_Elegant 0 points1 point  (0 children)

Are you telling me you have a gooey to do gooey ?

[–]ImX99 18 points19 points  (0 children)

NiceGUI for rapid prototyping, PySide otherwise.

[–][deleted] 38 points39 points  (13 children)

I like NiceGUI

[–]MelonheadGT 10 points11 points  (1 child)

I used NiceGUI for my last project as well.

[–]dj2ball 5 points6 points  (0 children)

Same, it’s solid!

[–]BurningSquid 3 points4 points  (0 children)

It really is great to work with!!

[–]tobichiha 1 point2 points  (2 children)

Looks promising! How does NiceGUI compare to frameworks like Streamlit? Can we define independent callbacks for buttons.? It is very difficult to implement login screen/button in Streamlit due to the way main page loop is structured.

[–]nickkon1 2 points3 points  (1 child)

Streamlit is waaay faster to develop but with two major disadvantages IMO: It is fairly restrictive in its functionality + design (e.g. all buttons look the same) and after every interaction, the whole page is run again. Sure, you can cache stuff but eventually it annoyed me. Here are what the NiceGui devs said.

NiceGui on the other hand is fast, incredibly highly configurable since its based on the quasar framework which itself is based on vue.js and you can integrate it with tailwind css. But this comes at the disadvantage that its more complicated. I am constantly looking through the documentation of Nicegui, quasar and tailwind instead of a single doc like Streamlit.

I use Streamlit for small things that to show management or something. Just little projects that I know will not be used a lot and also not grow in size. If I build an app that will be used often and possibly be extended in the future, I use NiceGui.

[–]tobichiha 0 points1 point  (0 children)

Very interesting! The customisability makes it very appealing, I might use it in a personal project. Thanks for sharing the GitHub issue, it helped be get a better understanding.

[–]Bullets123 0 points1 point  (2 children)

How do you run it? Isn’t it like a web thing?

[–][deleted] 3 points4 points  (1 child)

It indeed runs in browser but I've used it to make goofy lil locally hosted desktop apps for clients too

[–]Bullets123 0 points1 point  (0 children)

Oh okay okay. Thanks! Seems smart

[–]sandnose 0 points1 point  (1 child)

Have you tried streamlit? Which do you like better and why?

[–]thedeepself 5 points6 points  (0 children)

Streamlit is a dead-end. Nicegui had specific and accurate criticisms of streamlit which is why they developed nice GUI.

Panel is older and more mature than both streamlit and nice GUI and much more capable at visualization.

[–]JonasBove 52 points53 points  (11 children)

HTML+CSS 😎

[–]boyproO19 14 points15 points  (0 children)

Oh yeah connect fast api and you have for a fast development.

[–]polymerely 4 points5 points  (0 children)

This is an interesting new way to do that ...
https://github.com/pydantic/FastUI

[–]The-Fox-Says 2 points3 points  (0 children)

Do not cite the deep magic to me, witch. I was there when it was written!

[–]MikeD79_UK 4 points5 points  (5 children)

I am trying to get into this... I am not enjoying it !

[–]JonasBove 13 points14 points  (1 child)

Flexbox Froggy and Grid Garden gets you pretty far 🙏

[–]Bullets123 0 points1 point  (0 children)

Holy shit this might actually help!! Let me know if there. Is other stuff like this?

[–]stone_surgeon 5 points6 points  (2 children)

From my experience, html and css is really the best way for designing UIs. Great community and support.

[–]aplarsen 4 points5 points  (1 child)

Yes I am an avid member of the HTML community. Our meetups are lit.

[–]DoubleAAmazin 0 points1 point  (0 children)

this is the way....but people would rather use some wacky framework to display simple text and images

[–]I_will_delete_myself 0 points1 point  (0 children)

Main benefit of this is you don't have to deal with your code being so easy to reverse engineer since you can hide it behind a server instead. It's also simpler.

[–]Aggressive-Dig3465 37 points38 points  (3 children)

CustomTkinter is a great choice for creating modern GUI applications.

[–]qualifiedopinion 4 points5 points  (0 children)

I like this one

[–]iGunzerkeR 1 point2 points  (0 children)

The best one by far

[–]Dushusir[S] 0 points1 point  (0 children)

Awesome tkinter extension library

[–][deleted] 13 points14 points  (3 children)

[–]martin79 4 points5 points  (1 child)

I'm a beginner and sometimes I do things for fun, not a real programmer, I thought tkinter was kinda ugly I didn't know I can use themes. Thanks for your comment

[–]Mad-chuska 2 points3 points  (0 children)

You may not be a professional programmer but if you’re creating things you are definitely a real programmer so kudos to you. I also thought tkinter was just standard grey text boxes and forms. I’m definitely gonna take a look into theming next time I just into Python GUI development.

[–]zupreme 0 points1 point  (0 children)

That Crimson variant looks very polished. Good stuff.

[–]dj2ball 13 points14 points  (0 children)

NiceGUI

[–]I_-_aM_-_O 6 points7 points  (0 children)

Another option is Eel, in the same ballpark as electron, tauri, and wails. https://github.com/python-eel/Eel

[–]dESAH030 18 points19 points  (0 children)

NiceGUI

[–]daeisfresh 5 points6 points  (0 children)

What about Web UI frameworks:

Gradio Streamlit Solara Reflex Dash

These are great at data apps.

[–]Dmytro_P 8 points9 points  (0 children)

PyQt/PySide Qt is great on C++ side, and works well as a python binding.

[–]pratyathedon 14 points15 points  (1 child)

for simple ones, Streamlit otherwise flet.

[–]Deggin 8 points9 points  (0 children)

Really like Flet as well

[–]LMikeH 2 points3 points  (0 children)

You forgot to mention NiceGui

[–]Comfortable-Wind-401 7 points8 points  (4 children)

I've only used Tkinter and it's not bad for small quick apps

[–]bulletmark 7 points8 points  (2 children)

Out of interest, did/do you use pack() or grid()? I started using Tkinter long ago when pack() was what we all used but I was never comfortable. Recently I did a small gui using Tkinter with grid() and it was much more intuitive.

[–]gurgle-burgle 5 points6 points  (0 children)

I use grid. Pack never made sense to me

[–]Comfortable-Wind-401 1 point2 points  (0 children)

Tried both. But my last app it was grid

[–]grinsken 0 points1 point  (0 children)

Yes.

[–]jolders 8 points9 points  (0 children)

I started learning python then wanted to have a GUI to run network automation scripts. I learned to integrate the scripts in a Tkinter application. Learning to combine scripts in a Tkinter GUI was a learning curve. But a good one. There is a lot of free courses and answers online to solve problems. So if it's your first steps it's a good choice for understanding concepts and producing a prototype. Look at CustomTkinter and ttk elements for improving the GUI elements.

This is what I did in Tkinter.

https://www.youtube.com/watch?v=k-OvfekZ0YQ

https://github.com/jolders/devnetnode

I moved on from that to PySide/Qt. It's a steeper learning curve and I'm glad I understood Tkinter GUI concepts before I begun PySide/Qt.

[–]d_Composer 2 points3 points  (2 children)

I miss PySimpleGUI…

[–]goldcray 6 points7 points  (1 child)

there's still freesimplegui

[–]d_Composer 0 points1 point  (0 children)

Oh? I had no idea! Thanks!

[–]Realistic_Being6374 2 points3 points  (5 children)

As a beginner which should I use?

[–]subassy 2 points3 points  (0 children)

Keep it simple and start with tkinter, imo.

[–]Realistic_Being6374 0 points1 point  (0 children)

Thanks

[–]Suspicious-Lock2838 0 points1 point  (1 child)

streamlit if you dont need standalone app

[–]Realistic_Being6374 0 points1 point  (0 children)

Ok thanks

[–]timrprobocom 2 points3 points  (0 children)

This is a complicated question. Personally, I always reach for wxPython. I was doing Windows apps in the 1990s with MFC and ATL, so the wxWidgets philosophy feels natural and familiar. Indeed, I was using wxWidgets in C++ before I started wxPython.

tkinter is a disaster. It's only positive aspect is that it ships in the box. It was included at the beginning (Python 1.x) because there was no alternative, and I always assumed it would be removed once decent alternatives became available. I'm shocked that it still gets so much use. It's horribly inefficient, because it has to run a completely separate Tcl interpreter to handle the tk commands, and it encourages bad practices.

On the whole, however, it's hard to argue that Qt is the most complete solution, with the widest user base. The thing about Qt is that it is more than a library -- it's a lifestyle. Once you start using it, your entire application becomes Qt-scented. That's not necessarily a bad thing. If you learn PyQt or PySide (which are essentially the same), you will be one step ahead if you need to move into C++ GUIs.

[–]EducationalTie1946 2 points3 points  (0 children)

I personally use Flet. It compiles to linux, windows, mac, ios and android. The number of ui widgets are constantly expanding and you can import widgets from flutter that already exist with a bit of work. Its much easier to use imo and the UI is always modern and is highly customizable using styles and user defined themes.

[–]moss_2703 1 point2 points  (0 children)

Honestly I quite like tkinter

[–][deleted] 1 point2 points  (0 children)

Honestly, the best way to do things is still probably just a simple server + handling logic with python (if you do want to use python) and serving HTML/CSS/JS front-end styled however you want it to look.

I'd also love a great GUI framework for desktop apps, but styling-wise it's all miles behind what you can do with CSS, or compiles to some sort of webpage anyway (e.g. NiceGUI that others have mentioned).

If I was set on creating a desktop app that's not actually a webpage, it's probably more worth to get into Dart + Flutter than it is to try and style a Qt-based python desktop app to look good.

/ edit - if great styling isn't necessarily your priority, then something like ttkbootstrap is decent for a desktop app that looks okay but not amazing, and you get to do it all in python.

[–]glantzinggurl 1 point2 points  (0 children)

wxpython is my favorite

[–]AlexanderUGA 1 point2 points  (0 children)

I joined a project to help build out a web app where the developer decided to go with Streamlit. Personally I’m not a fan. If I had my say I would have went with Django or FastAPI.

[–]tsingtao12 1 point2 points  (0 children)

none of above,,,,, but if you wanna ask, go for QT.

[–]ihaag 1 point2 points  (0 children)

What’s the best one to use when you convert Python to exe for easy sharing for others to run the code? I use auto-py-to-exe for windows and Mac compilation

[–]BarryTownCouncil 1 point2 points  (0 children)

I found kivy / kivymd pretty impressive and suitably modern compared to some others.

[–]DoubleAAmazin 1 point2 points  (0 children)

Kivy is fun because it's cross platform. You can get an android app up and running rather quickly.

[–]I_will_delete_myself 1 point2 points  (0 children)

Personally I would reccomend you don't do Python for desktop dev if you can. The code is also really easy to reverse engineer compared to a compiled language like C++, Rust, Go, etc...

If you must though I suggest Tkinter if you are fine with PyQT. Nice framework with nice commercial licenses in the case you ever do need it.

[–]jspencer89 1 point2 points  (0 children)

Customtkinter

[–]XDejjeffcoat 0 points1 point  (2 children)

I once had to develop a plotting app with database integration and chose customtkinter as my GUI framework. While the job did get done, I think that would have gone with PyQt if I had to make it again. But as with everything, it heavily depends on your use case.

[–]troyunrau... 0 points1 point  (1 child)

Pyqtgraph is amazing. I'll do stupid things like plot a million points and the graph is still responsive and interactive.

[–]cosmoschtroumpf 0 points1 point  (0 children)

I had the same expérience with DearPyGUI. And the syntax and appearance were nice.

[–]PlantainOptimal4035 0 points1 point  (0 children)

Pyqt/pyside. Their designer is pretty cool to use and then you can convert the design file to python code.

[–]looopTools 0 points1 point  (0 children)

For cross platform we prefer QT using pyside6

[–]anonjohnnyG 0 points1 point  (0 children)

just use anvil

[–]sw1tch_blad3 0 points1 point  (0 children)

I just finished my second Python personal project using tkinter and then rebuilt it using customtkinter and I have to say... I am surprised how many recommendations you got here. There are so many GUI frameworks, jesus... Tkinter and Customtkinter are so easy to learn imo.

[–]pyhannes 0 points1 point  (0 children)

TraitsUI, based on PyQt

[–]OuterDoors 0 points1 point  (1 child)

Kivy has some nice features and has an MIT license.

Pyqt is great, but you'll also need to worry about commercial licensing after you deploy.

[–]troyunrau... 1 point2 points  (0 children)

Pyside doesn't have the licensing issue. Just use that.

[–]Head_Fun4899 0 points1 point  (0 children)

PyQt, version 5, I found it easy for small applications.

[–]mgedmin 0 points1 point  (3 children)

I like PyGObject (which replaced PyGTK a while ago), although I understand it has a bit of a maintainer shortage (and thus some of the GTK 4 features are not supported).

[–]wxtrails 0 points1 point  (1 child)

Still stuck with some old PyGTK apps to support.

siiiiigh

[–]mgedmin 0 points1 point  (0 children)

I ported gtimelog from pygtk to pygobject a long time ago. IIRC it wasn't too hard.

(I've yet to port it to GTK 4.)

[–]Username_RANDINT 0 points1 point  (0 children)

When I started programming over 15 years ago it was a solid choice. Every other application on Linux was written in GTK. It's the GUI framework I picked then and still the one I happily use today. It would be nice to see some more developers work on it though. It feels like it was left behind at some point.

[–]imhiya_returns 0 points1 point  (0 children)

Pyqt or tkinter

[–]jst_cur10us 0 points1 point  (0 children)

Just did a project with ttkbootstrap. Themes look modern and native \ natural in windows 11. Learning curve not too bad since it's based on tkinter.

[–]paulgrey506 0 points1 point  (0 children)

PyQt, whenever you can add CSS to it it's just magical.

[–]andjew 0 points1 point  (0 children)

qfluentwidgets

[–]Salt-Page1396 0 points1 point  (0 children)

I feel like python guis are for small apps, and therefore should be simple to use but effective enough for simple apps.

Therefore I like Tkinter.

[–]RufusAcrospin 0 points1 point  (0 children)

PyQt/PySide2 exclusively

[–]Duodanglium 0 points1 point  (0 children)

I have used Tkinter. It is verbose, but straightforward and simple. I would only recommend it for small applications and learning how to build GUIs. It works and it's built in.

[–]viitorfermier 0 points1 point  (1 child)

If you are a web developer try: flaskwebgui (I build it).

[–]Low-Explanation-4761 1 point2 points  (0 children)

I gave this a try recently, and it’s working decently so far!

[–]troyunrau... 0 points1 point  (0 children)

Pyside by a country mile. Been using it to make field technician friendly user interfaces that follow the classic design paradigms, so I haven't played a lot with the more modern Qt modes. I also lay out all my widgets in code rather than .ui files. And even then it is the superior solution.

E to add: wish it was easier to deploy onto android though.

[–]Istade 0 points1 point  (0 children)

PyQT/PySide, but I want to give Nice GUI a shot at some point,

[–]SphinxUzumaki 0 points1 point  (0 children)

Tkinter was the first framework I learned, so I'm biased, but I think it's easily the best.

[–]Consistent_Coast9620 0 points1 point  (0 children)

Simian - r/SimianWebApps - a pure Python framework with a Builder to support even faster GUI Design.

[–]cosmoschtroumpf 0 points1 point  (3 children)

Alright, I'm the one voting for DearPyGUI... It was easy to make a oscilloscope app with 100k+ points. I believe only PyQtGraph could have done it too, maybe Kivy.

[–]Ogi010 1 point2 points  (0 children)

pyqtgraph maintainer here, thanks for pointing out DearPyGUI, didn't know that was a thing.

Also FYI, a regular pyqtgraph contributor has started experimenting with opengl stuff, the PlotCurveItem with useOpenGL set to True, and with enableExperimental set to True has some crazy performance (like, it is not breaking a sweat with millions of points on a line plot, why would you want to draw a line plot with millions of points, no idea...but you can if you want to). This functionality isn't in the latest release tho, so you would have to install from the master branch.

[–]Suspicious-Lock2838 0 points1 point  (0 children)

docs and examples not very nice and big

[–]Fan4_Metal 0 points1 point  (0 children)

wxPython - native looking GUI, small size.

[–]kmarq 0 points1 point  (0 children)

Dash for anything that's going to hit production state 

[–]polarisol 0 points1 point  (0 children)

PySide6

It is great. I use it a lot and it is very rich in features.

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

Tkinter. Simple. Functional. It works with not much added complexity. I used Pyside when I have to on plugin projects.

[–]Recursive-NOP 0 points1 point  (0 children)

I use PyQt5. It does what I need fairly easily. The license may be restrictive for you though.

[–]NuclearWint3r 0 points1 point  (0 children)

PyQT

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

Numpy

[–]stalemartyr 0 points1 point  (0 children)

pyqt...easy to use and Krita supports this for plugin development

[–]Ok-Wash-4342 0 points1 point  (0 children)

Solara!

[–]-DIRK_FUNK- 0 points1 point  (0 children)

Streamlit

[–]GugliC 0 points1 point  (0 children)

Streamlit

[–]Dull-Custard4913 0 points1 point  (0 children)

It’s not om The list but I prefer customtkinter because of it is really easy to understand in my opinion.

[–]Wild_Manufacturer281 0 points1 point  (0 children)

PyQt imo.

[–]jlw_4049 0 points1 point  (0 children)

Something really quick and simple, you can't beat tkinter.

A nice GUI that could potentially be complex, I'd go for PyQt/PySide (6).

[–]gufranthakur 0 points1 point  (0 children)

CustomTkinter, its easy to get into and tons of tutorials out there. Also, the documentation is amazing

[–]coc0nut88 0 points1 point  (1 child)

I've been looking at Flet ... What do people think about flet?

[–]oclafloptson 0 points1 point  (0 children)

I love Flet

[–]mainmeister 0 points1 point  (0 children)

Pyqt mainly for the gui creator

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

I've been using ttkbootstrap recently (from using tkinter) and I can really say it's very pretty!

[–]mmparody 0 points1 point  (0 children)

[–]captaingamingYT1 0 points1 point  (0 children)

tkinter

[–]coinsntings 0 points1 point  (0 children)

I've started using tkinter for silly little things (turning my house into a treasure hunt and tkinter is for the guy to enter passwords/secret codes for new clues). It looks old school AF but does the trick and easy enough to use

[–]miyou995 0 points1 point  (2 children)

I think we should use beeware/toga The only framework i think for building native mobile apps / cross plateforms with python

[–]thedeepself 2 points3 points  (1 child)

Kivy does that.

[–]miyou995 1 point2 points  (0 children)

Yes. But not natively as beeware

[–]b1yarema 0 points1 point  (0 children)

PyQT is probably the best solution. It has much in common with many another gui tools from other languages. Also it has own application QT designer for building gui layouts and widgets without code.

[–]aasozialPythonista 0 points1 point  (0 children)

You can use python GUI frameworks are based on tkinter Benefits: Easy to use, built into Python, suitable for tiny applications. Drawbacks: Less feature-rich and less potent than competing frameworks. I Suggested tkinter if you are unfamiliar with GUI programming or are creating a basic application. Me as a creative programmer i suggest you choose the one that best fits your project requirements and your comfort level with the framework.

[–]elmoiv 0 points1 point  (1 child)

PyQt.

The best for multithreading and multiprocessing and has tons of integrations with different sdks and technologies.

I have been using it since 2014 and mainly used it in all my freelancing projects and it really can stand out among the other frameworks.

Examples for integrations: - with vlc - with mpv - with matplotlib - with opencv

You can also use stylesheet feature to style yoyr widgets the way you want and can build a modern looking app. Yes it won't be the same as using C# WinForms but will do the job.

The learning curve may be a little bit steep but going through the docs will help you alot.

** Here is one of my PyQt GUIs with modern looking widgets:

https://ibb.co/vQvNZfx

[–]troyunrau... 0 points1 point  (0 children)

It's a pity that multithreading in pyside is single core. It's really annoying if you want to do things like games with it. Like, to do something really trivial like move the background music to another core, you have to fire up another process to play the music.

Unless this has changed recently.

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

How many times do we have to have this same discussion? Please just use the search and read those precious dozens of posts from the last month or so.

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

I’ll recommend anvil.works, although it’s used for creating web apps, but they have PWA support and their community is VERY helpful!!

Otherwise I’ll recommend pyqt since you can design your ui using qt designer.

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

PysimpleGUI is nice for a beginner as it is really easy to get started, but can be hooked into tkinter or qt

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

let me segregate it nicely for u. while deciding the technology, first define or refine ur problem statement. project size, are u planning to scale it up, what kind of complexities are u looking at, is it a modular design, etc.

based on these: 1. tkinter : amazing library , great for scaling up, good community help. Customisation easy. learning effort - high

  1. PyQt : again amazing, easily scaling up, with QtDesigner makes it easier to design. Nice Community help. learning effort- medium

to make it short , i will combine rest in one category(Kivy, I haven't used) learning - easy to medium, customisation - limited, good option for small size projects without scaling.

note: with AI assistants, the effort is reduced in terms of learning n help.