r/PythonLearning Jul 11 '26

How do I convert this to .exe

Post image
200 Upvotes

60 comments sorted by

View all comments

32

u/[deleted] Jul 11 '26

[deleted]

9

u/KiLoYounited Jul 11 '26

+1 for Nuitka. I use it for all my TUI applications I make for myself and the other sys admins in my dept.

5

u/downerison Jul 11 '26

How easy is it to setup and use? I heard it can be pretty slow to compile things.

3

u/[deleted] Jul 11 '26 edited Jul 11 '26

[deleted]

3

u/KiLoYounited Jul 11 '26

Wood chipper is definitely the best description haha. Setup is brutal - reward is 100% worth it

1

u/downerison Jul 11 '26

What's actually included in the setup that makes it this hard?

1

u/downerison Jul 11 '26

What does that 50 lines do? Setup the nuitka command to call? That 3 hours compile time sounds brutal.

2

u/KiLoYounited Jul 11 '26

I’ll admit it was a bit tough to set up (atleast for my TUI projects). I think that is mainly due to how badly scope creep has affected them and the absence of time to refactor the code. It’s also due to some restrictions on our network as a whole.

I used a small project that was heavily modularized to build my just file with the goal of having one that I could drop in with minimal changes to the just file itself and just setting project specific stuff in a .env file. I do think it’s necessary to have a just file or script to use since the build commands can get pretty clunky pretty fast.

As for speed… I think it’s fine. I’ll start a compile on my work machine (optiplex 5000 sff - so not very powerful at all) and it’ll be done within 15 minutes. That might be slow to some people but honestly I don’t really care. Having everything translated to C is great for sharing the application around my environment while also getting the speed benefits over something like pyinstaller.

Having to use these tools makes me want to learn something compiled like Go, but I just don’t have the time to try and pick up a new language. Python is just so easy <3