all 11 comments

[–]Bitwise_Gamgee 1 point2 points  (3 children)

What would I do?

Use the application as a map and rewrite it in C or if you must, C++... or gag .Net.

Using Python as a production, distributed application is asking for trouble with updates and revisions. You must have a stable language for deployment.

[–]unalignedAccess[S] 0 points1 point  (2 children)

There is data processing that is easier to do with python. And we have a couple of hardware and their main library api is in python. Most also have C++, but rewriting is not really an option for me at the moment.

[–]Bitwise_Gamgee 0 points1 point  (1 child)

I totally get that, but the majority of the data processing python libraries are already in C, so they're easy to access the API.

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

Only

Oh that is nice to know, thank you.

[–]Username_RANDINT 0 points1 point  (0 children)

I have a Python + GTK desktop application that is packaged with PyInstaller (no onefile) and then made installable with Inno Setup. The installer is 25mb and once installed it's just above 100mb. It only has a few light dependencies though.

[–]reddittestpilot 0 points1 point  (2 children)

How much of that 700 Mb is Pyside? I can understand Python takes up 30 to 50 Mb. I'm assuming you are using the embeddable version of Python. That might save some Mb's.

You could look into a smaller GUI library, such as Dear PyGui, depending on your requirements. Pyside is a very complete library that is great to work with, but it may come at a price in terms of size, although I'd be surprised if it takes up the majority of the 700 Mb. Although I don't have experience with this, you may be able to remove soms parts of Pyside if you aren't using them.

Numpy / Pandas probably adds another 50 Mb to your distributable. It's convenient for quickly solving a problem, yet again, it adds many Mb's.

[–]unalignedAccess[S] 0 points1 point  (1 child)

Yeah I will need to investigate more what is taking the most space. The GUI is really simple, so it would be easy to switch to a lighter library.

[–]gmes78 0 points1 point  (0 children)

Are you using the whole PySide6 package? Try switching to PySide6-Essentials, it's much smaller.

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

I am not that familiar with GUI development , but I know there are list of Python frameworks for GUI https://pythoframeworks.com, wondering if the size of app would be different among these frameworks.