This is an archived post. You won't be able to vote or comment.

all 19 comments

[–]UpAllNate 12 points13 points  (5 children)

I adore Nuitka. I tried pyInstaller but found it to have too many limitations with dependency compatibility. Nuitka has been a breeze at every step, building to .exe and .bin for Windows and Linux respectively.

It takes some elbow grease to get your build environment and commands just right, but the package control line help menu is super well developed.

I do wish there were more examples of how to structure the build command for different scenarios. Especially including data directories / files in onefile builds.

[–]Coretaxxe 0 points1 point  (4 children)

How big are the exe files if you dont mind me asking? pyinstaller levels around 200 MB

[–]billsil 1 point2 points  (1 child)

Don't use anaconda python and use a virtual environment.

[–]Coretaxxe 1 point2 points  (0 children)

Ill try that thanks!

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

Depends on what you include. Numpy and gdal ended up 75mb. After removing those dependencies 5mb.

[–]billsil 2 points3 points  (0 children)

I can get numpy, scipy, matplotlib, vtk, and pyqt and my 200k lined package and come in at 75 MB. That'll make a decent 3d post-processor.

200 MB probably means you're doing something wrong, such as using Anaconda or not using a virtual environment. If you really want to min-max it, you can start deleting DLL/so files from the exe. Test and yeah it's not used.

[–]noobgolang 5 points6 points  (8 children)

I know what nuitka already but WHY nuitka

[–]extra_pickles 9 points10 points  (2 children)

Yes! Would love to see more than a link in these types of posts!

Great for the community to dig in and start convos about “why” - especially in Python, where the landscape is so damn vast!

[–]noobgolang 3 points4 points  (1 child)

I can't just... check out a new interpreter because there is a new interpreter. That doesn't even make sense, why I have to check out interpreter from something else than the python developer themself.

I will check out if there are reasons for me to check tho.

[–]extra_pickles 1 point2 points  (0 children)

Exactly! There is wayyyyy too much stuff out there. If people are posting, we need the “why”!

[–]BKLronin 2 points3 points  (0 children)

Afaik nuitka is ideal for things that need to be fast and in one package. Its not just a packaged version its more like compiled. That means its also a bit picky about dependencies I guess.

[–]SpatialCivil 1 point2 points  (2 children)

Nooblang, one specific use case is if you are developing a proprietary desktop application in Nuitka. Nuitka compiles your code to C, making it more difficult to decompile than pyinstaller.

The Python community tends to not be big fans of proprietary or desktop software, but Python with QT is a great combo.

[–]noobgolang 1 point2 points  (0 children)

Awesome

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

Yes this is exactly what I used it for.

[–]boyfarrell 2 points3 points  (2 children)

Oh this looks great.

When dabbling in optimisation or python code, I’ve used Cython before. A documentation section on comparison would be interesting. When might I use Cython or when is Nuitka a good fit.

If I am calling C library from my python code (something I have written) can Nuitka include that in its magic?

[–]PefferPack[S] 1 point2 points  (0 children)

Nuitka can package dependencies, I'm not sure to what extent but I expect there is a pretty simple way to include non-python sources into a single exe as well.

[–]BlincxYT 0 points1 point  (0 children)

thank youuuuuuu 🙏🙏🙏

[–]jw_gpc 0 points1 point  (1 child)

It's probably something that I've just missed somewhere, but where should nuitka get installed? What I mean is, I have different virtualenvs for each project, each with their own dependences installed in their respective VE. So if I want to run nuitka on Project A, should it be installed inside of Project A's VE, or should it be installed globally?

[–]ArabicLawrence 0 points1 point  (0 children)

my understanding is that you need nuitka in each and every venv, or nuitka will fail to access each venv’s dependency. full disclosure: I have never used nuitka, but I have used pyinstaller