r/learnpython • u/xtotdam • Feb 20 '24
What python GUIs do you recommend?
Hi all! With the recent planned 'sunset' of pySimpleGUI 4 and questionable license for psg 5 which GUI library do you recommend? About my work: I'm a scientist in a field on nanophysics and I have to put many graphs into my programs and prefer GUI building to be the lesser problem;)
Upd: I worked for a year or so with psg but now want to move
Upd2: Big thanks to all of you for the suggestions! If anyone curious, I settled with DearPyGUI as it seems to meet all my needs and isn't (sorry) web-based.
Upd3: Their digital signature is so broken, it required like 30 minutes to tamper their code LOL
35
u/Allanon001 Feb 20 '24
3
4
3
u/Timoroader Feb 20 '24
I have used NiceGUI for prototyping and simple applications, works really well. Can only recommend it.
2
1
1
0
Feb 20 '24
[deleted]
2
u/d_a_v_e_h Feb 20 '24
Not sure about flet, but you can do that using DroidScript.... they've just released Python support and sensors are accessible (as well as most other native Android features)
Note: You don't have to edit code on mobile, you can connect it to a web browser for a full sized IDE and it can build both APKs and AABs.2
9
Feb 20 '24
We use plotly dash at work for building data focused web apps.
3
2
1
u/cedenof10 Feb 20 '24
would you mind sharing an image of an example?
2
Feb 20 '24
I can’t I’m afraid, it’s super proprietary data. But imagine web app with a couple of drop downs at the top and below a row of tabs. You can select a project and a scenario with the drop downs and then view plots of the different analyses on each tab.
Plotly plots are interactive, you can zoom, hover for datatips and filter as you like. You can also assign callbacks to UI elements so calculations can be done on the fly.
1
3
u/this_knee Feb 20 '24
What?!!! Nooooo! That’s awful! What an awful choice. They totally removed the source code from the open source repo for pysimplegui. What a turn to make. Disappointing.maybe find more answers here
4
u/xtotdam Feb 20 '24
Haha, they also banned me from issues for asking questions)
1
u/WoefulStatement Mar 17 '25
Well I mean, issues are for reporting issues, not for asking questions.
Not to justify their other actions, but this particular one might be reasonable.
2
u/xtotdam Feb 20 '24 edited Feb 20 '24
Exactly, this is a huge red flag. However I was using it for a year or so and it was nice, but now it is time to move on
1
u/el_extrano Feb 20 '24
Wait so what happens to stuff we already made and deployed? Wtf
1
u/xtotdam Feb 21 '24
Version 4 is licensed under LGPL license, but I'm not a lawyer to describe the license transition correctly. I personally saved a 4.60.5 wheel from Pypi and quickly switched to another GUI for my current projects. Luckily the fact that I'm scientist and my management doesn't care I can do it)
0
10
u/dj2ball Feb 20 '24
I've usd NiceGUI a fair bit for modern feeling web ui's. Its basically an API for running Vue components styled with css directly in your python code. I've found it very solid for prototyping and throwing together quick GUIs on top of my regular scripts.
1
u/RexehBRS Feb 20 '24
This hurts as was looking at web UI connectors and didn't want electron complexity so just redone everything in pyside6..
Vue would have been fab :(
3
Feb 20 '24
[removed] — view removed comment
2
u/dj2ball Feb 20 '24 edited Feb 20 '24
It has boilerplate css based on Tailwind styling baked in, yes. You can also write custom css directly in your python file to pass to components to customise them more. Check the library out the docs have some great examples.
9
u/dumper514 Feb 20 '24
Have you tried streamlit?
2
u/Dilutant Feb 20 '24
I have tried every python gui package under the sun and nothing is as good looking and simple as streamlit. Agree that it doesn’t scale well for complex tasks but for simple workflows it’s so much easier than pyside.
1
u/JuicyJfrom3 Nov 19 '25
Looks great but the lack of local file directories and the way it handles state is an absolute killer. There are other work arounds as well but it is very pretty.
6
u/Kooky-Most5115 Feb 20 '24
Pyside6. From what I understand, you'll have no licensing issues, and although it's a bit more complicated than tkinter, it has so much more/better functionality, specifically when it comes to embedded graphs, multiprocessing/multi threading etc. ive also found that with a bit of chat gpt usage you can get things up and running quite quickly, and you'll be understanding and using it in no time.
3
u/Kooky-Most5115 Feb 20 '24
Also, I've used tkinter and also web apps using eel. Tkinter doesn't have great support for a lot of things I ended up needing to do, and web apps feel bloated + using JavaScript html css + not great support for embedding matplotlib graphs.
1
u/ProjectSnowman Feb 20 '24
I really like Textual. For basic inputs and outputs it does a great job and it’s pretty lightweight.
1
1
u/Quillox Feb 20 '24 edited Feb 20 '24
I have to recommend you make a web app, it will make sharing you results much easier. Use Django and follow the model view control pattern. Making a relational database for your data is a fantastic exercise and will again make your data more accessible.
Some people recommend Flask because it is "simpler", but I'd argue that using Django from the beginning and not using their more complex features is just as simple. And it has the added bonus of when you eventually want to use these features, and you will at some point, Django makes it much easier.
ETA: Try out Plotly for your graphs! It's a very simple way of getting interactive graphs. Just export them as html that can be directly used in the Web app.
2
u/xtotdam Feb 20 '24
Thanks! I used Django several times but for simple web apps solely. I am afraid it won't fit for the simulation program that has to be responsive and will eventually be rewritten or forgotten
3
2
2
Feb 21 '24 edited Aug 19 '24
fine somber murky languid wine growth retire automatic dime rob
This post was mass deleted and anonymized with Redact
1
Feb 20 '24
I’ve been enjoying pyqt recently. Found it very easy to block out a gui with the visual designer program and then add functionality inside the code
1
u/hugthemachines Feb 20 '24
I make a little gui once in a blue moon. I usually use Easygui, I think it is a wrapper for tkinter. It is very easy to use, though.
1
1
u/murilomm192 Feb 20 '24
I too tried every way to make a GUI since my work involves sharing my scripts with various non-coding coworkers.
To me, nothing beats streamlit, Sure it is not well suited for more complex stuff, but the convenience of clicking a button the the app is published with a link that I can just share makes it invaluable to me.
When I cross that threshold of complexity I usually go directly to javascript land, Using Svelte more and more these days.
1
u/DataSynapse82 Feb 20 '24
I would suggest to use Streamlit, it is really straight forward to build web apps to showcase graph/charts or dashboards, it is easy to use also to implement machine learning models within the app, any question let me know
1
1
u/mmmmmmyles Feb 20 '24
For web-based, there is marimo. It's more of a notebook, but you can convert the notebook to an application (by hiding the code) in the end.
E.g. here is a program about The Mandelbrot Set
1
u/pyeri Feb 21 '24
My favorites are Tkinter and PySide5. Both are extensive and time-tested libraries, and widely used. I usually prefer the former for most typical GUI apps.
0
0
Feb 20 '24
[deleted]
1
u/Fabiolean Feb 20 '24
I think this project is super cool but the old name was a lot better. Used to be called Pynecone.
116
u/jimtk IdontChat Feb 20 '24
Tkinter: Easy, quick, in standard library. Not too many options, looks awful, cracks at the seam on complex things, documentation is between bad and non-existent. Custom-tkinter (look for it on github) makes it look better.
Pyside6/PyQt6: Extremely powerful, has everything and 3 kitchen sinks, looks as good as you want, reliable. Pretty big learning curve, documentation is geared to c++, once you get in the qt boat you stay on the qt boat.
html/CSS/Javascript. As complex as you want, good learning opportunity, can look amazing, usable on phone and tablet, final app is easy to distribute and update. Requires a server (that's huge!), need to learn multiple languages and frameworks so big learning curve, cannot center a div :) !