Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I create single file executable with nuitka?

As title says, can I create single file executable with nuitka? I tried --portable and --standalone option but they does not seem to work. And can anyone please explain me what is the --recurse-all option? And if you have some other recommendations please tell me. I dont want to use pyinstaller because its too slow to start my app. Thanks for any response.

like image 782
Jakub Bláha Avatar asked Aug 28 '17 13:08

Jakub Bláha


People also ask

How does Nuitka work?

Nuitka (pronounced as /njuːtkʌ/) is a source-to-source compiler which compiles Python code to C source code, applying some compile-time optimizations in the process such as constant folding and propagation, built-in call prediction, type inference, and conditional statement execution.


1 Answers

This seems to work on my side with Qt bindings:

Nuitka-0.5.27/bin/nuitka --standalone --recurse-all --recurse-on --recurse-directory --show-progress --show-modules --plugin-enable=qt-plugins --python-version=2.7 --remove-output --output-dir=nuitka-build main.py

You will end up with "main.dist" directory with all the dependencies and the binary "main.exe".

like image 75
nvd Avatar answered Sep 21 '22 23:09

nvd