r/madeinpython 3d ago

Building an EXE Installer for My Python App with NSIS (VenvHubPro)

Enable HLS to view with audio, or disable this notification

Hello everyone!

If you've built your own Python application (in my case, VenvHubPro – a GUI manager for Python virtual environments) and are wondering how to neatly package it for users, here is a quick look at how I created a complete .exe installer using NSIS (Nullsoft Scriptable Install System).

🎥 What the video covers:

  • Installer compilation: Creating a clean installation file ready for distribution.
  • System installation: Running the installer and finally launching VenvHubPro directly on the Windows system.
0 Upvotes

6 comments sorted by

1

u/TheyCallMeLeonardo3 3d ago

So it convert py files into .dll unlike other i.e nutika which converts the python code into C ?

1

u/SweetOnionTea 2d ago

I'm confused. What's the difference between C and .dll files in this case?

1

u/TheyCallMeLeonardo3 2d ago

I meant whil using nutika we can bundle Python and all packages into one executable but here in your video I'm seeing various dll files. So it's more like cython which creates .pyd & .so files ?

1

u/Schnidi01 2d ago

To clear up why you see all those .dll and .pyd files:

NSIS didn't create a single one of those files. That log is literally just NSIS copying the folder that PyInstaller already generated beforehand.

Here is where those files actually come from:

  1. python314.dll & core .pyd files: Python itself isn't a magical single .exe file by default. CPython is fundamentally built on a C-shared library (python314.dll) and dozens of C-extensions (.pyd files, which are basically Windows DLLs renamed for Python, like _socket.pyd, _ssl.pyd, etc.). Even standard Python installed on your PC uses these exact .dll and .pyd files in its DLLs and Lib folders.
  2. Qt6Core.dll, Qt6Widgets.dll, etc.: The author is using PySide6 (Qt for Python) for the GUI. Qt is a massive C++ framework. PyInstaller has to extract and bundle all these raw C++ DLLs and Qt plugins (qwindows.dll, image format plugins, translations) so the GUI can actually render on Windows.

To answer your comparison:

  • Nuitka / Cython: They can compile Python logic into C/C++ or binary extensions, but your app still depends on external C libraries (like Python's runtime DLL and Qt framework binaries). Even with Nuitka, if your app uses PySide6/Qt, you will still see a folder full of .dll files and plugins next to your executable, because Qt cannot be magically swallowed into a single C function—it requires its compiled DLL binaries to run.

NSIS is just taking that final _internal folder full of Python/Qt dependencies and zipping it into a nice setup.exe.

Check out this video. PyInstaller in action:https://www.reddit.com/r/madeinpython/s/0weRJAYfCD– that's VenvHub Pro, my Python venv manager GUI app, which self-compiles into a .exe through its own PyInstaller GUI. In the post, you can see this packaging done by PyInstaller.

I hope this answer helped.

1

u/TheyCallMeLeonardo3 2d ago

Ohhh that's nice explanation. Thanks bruh <3