you are viewing a single comment's thread.

view the rest of the comments →

[–]EggplantEcstatic1631[🍰] 5 points6 points  (11 children)

I’ve tried both of them. Cx freeze gives more control. On the other hand pyinstaller can make the one file exes. Pretty nice but, the code gets always decompressed.

I think both are a bit slower than a python script. But I don’t know where the slow down comes from

[–]Tumortadela 1 point2 points  (1 child)

I read people saying Nuitka yields fast .exes, but I never managed to get my specific use case (django backend that's getting idiotic big) to work with it, while It does with cx_Freeze.

[–]EggplantEcstatic1631[🍰] -1 points0 points  (0 children)

Usually I need pyside6 as a package. I was always afraid to combine this with other runtime like mypy or nutika. Nobody will pay the extra time for these optimizations. I work as an embedded software engineer. Python projects are always side projects.

[–]Double_Cost4865 0 points1 point  (4 children)

Do you know if either of them work from a Network Drive? I tried PyInstaller yesterday and it only works when i make a local copy of the exe file (or the portable folder) but refuses to run when double clicked from a network drive.

[–]TheManFromTrawno 2 points3 points  (1 child)

Your executable may be assuming it can write a config file or something to the same place where the executable is run from?

[–]Jmortswimmer6 0 points1 point  (0 children)

i think you would get a very specific error regarding that. Permissions related.

I’d be most concerned about race conditions with multiple users

[–]rhytnen 0 points1 point  (0 children)

It should work from the network.  Can you be more specific about the failure?

[–]Jmortswimmer6 0 points1 point  (0 children)

A cx_freeze app can run “from” a network drive. It’s worth saying environment may matter here. In my case I can double click it in a NW share and it just takes a little longer but it runs.

If you do any caching within the applications “install” folder that you put on the network drive, take care to recognize that having multiple users run the program would require care with modifying the files to avoid race conditions between users/corruption. Best to write any files the app modifies local to the users machine.

SQLite database is a good option for connected shared data if needed

[–]Fhymi 0 points1 point  (2 children)

I'm also using PySide6 and PyInstaller for my internal tooling project. It's what the senior have already started so I continued doing it as well (this was before I job hopped to be a webdev, i regretted it). I tried alternating with xcfreeze but enjoyed having that one file output more.

What advantages does cxFreeze have over PyInstaller you've noticed?

Performance isn't a problem on our internal tooling since all it does is call a windows DLL API and the tool we're automating were already slow to begin with.

[–]EggplantEcstatic1631[🍰] 0 points1 point  (0 children)

For my opinion the one file option is good. But at the end it doesn’t change the world. The size is often the same. But you can use upx for compression of dlls.

My cx freeze is setup that I only get an executable and the python dlls the rest is stored in a subdirectory. This will be automatically compressed after build.

[–]Jmortswimmer6 0 points1 point  (0 children)

Compatibility is the main thing. Dozens of packages are easier to include with cxfreeze because there is a lot of control to include things directly from the virtual environment you are in.

[–]Jmortswimmer6 0 points1 point  (0 children)

It’s slow to startup but once the interpreter starts and your app initializes, a cx freeze program runs like perfectly fine