Pyinstaller vs Nuitka comparison
HTML-код
- Опубликовано: 15 сен 2024
- In this article, we will compare two popular Python libraries used for creating standalone executables, Nuitka and Pyinstaller. The comparison will be based on metrics like "load time", "performance", "space", etc.
Forgot to a mention a little tidbit. Nuitka EXE's are less likely detected to be viruses or potential malware due to the way it creates EXE's. It's uncommon, but pyinstaller applications are sometimes caught by firewalls (like Windows)
Also released a short video series on Nuitka. You find the link to the main Nuitka tutorial here.
ruclips.net/video/z2aHkuBCLN8/видео.html
Last time I tried using pygui with nuitka it was Bing detected, but I fixed that by using ctypes to make the app calls instead. Maybe it's been fixed now
its the opposite, built my software with autopy2exe & nuitka, then scanned them on virus total, autopy2exe return a score of 8/72 while Nuitka gets detected 35/72
I think nuitka is total winner. For qt apps nuitka's exe output size is 2 times smaller then pyinstaller. Only one big disadvantage is compile time. It requeres too long time for complex apps.
Yes, I agree with you. Though I am surprised that Nuitka produces smaller EXEs. I guess it varies from case to case, and what settings you are using. Nuitka's onefile mode + zstandard optimization is pretty good when it comes to file sizes. On default settings for both, I have found PyInstaller EXE's to generally be smaller.
When using pyinstaller to compile I find it gets stuck on "Performing binary vs. data reclassification (10038 entries)" for an hour or more.
Excellent video. Very informative. Thank you very much. Really appreciated. 👊
Excellent! Keep it up. 💯
Thank you.
What about cxfreeze?
Do you have any idea why would my 700 lines of code includes 7 imported libraries pyinstaller compiles around 24 hours?
I replied to your other comment as well, but here are a few suggestions.
1. Try some other library like cx_Freeze to try and isolate the issue (whether it's a device issue or library issue).
2. Try compiling a regular program without any imported libraries on Pyinstaller. Should not take more than a few minutes.
Can Nuitka protect our Python source code from get reversed if you say it compiles to binary ?
Absolutely, yes it does. It's more secure than any of the other Python to EXE converters out there.
@coderslegacy5661 Great. I think for many this will be a decisive advantage. If the project is intended to be distributed and licensed
More than everything security is very important. Is Nuitika make native machine code binary, which can't reversed to sourcecode ?
This isn't explicitly mentioned anywhere in their documentation last I checked, but I found an interesting conversation on their github where someone attempted to reverse engineer it, but failed after several attempts.
To answer you question, I believe that Nuitka is more secure than most, if not all of the other .PY to EXE converters.
@@coderslegacy5661 Thanks for your swift response. You gave wide knowledge too. I stuck with a security issue on my python project where PyInstaller was used.
So I am trying Cythonize the py code and using gcc to compile and machine code native binary. Which is impossible to reverse the source code back. I think Nuitika must do the same process automatically.
Any clue how to hide all the strings in the compiled binary ?
I need auto process.
Sir can we add a splash screen in nuitka
Sorry for the late reply, but yes, we can.
ruclips.net/video/yL0_K2lKFEQ/видео.htmlsi=K4Oq68t4fX7fuF35
is it possible to decompile nuitka ?
I think i mentioned this in another comment somewhere, but basically I tried looking online for a way to decompile nuitka, and didn't find any leads. There was someone else (who posted their findings on the nuitka github) who tried to decompile nuitka using several methods. Which all failed.
So asaik, no. Nuitka's conversion of Python to C makes it very difficult to decompile.
Nuitka better for output size of exe file 😊, not py installer