PACKAGE
Once your PyQt app works, you will want to share it with people who do not have Python. PyInstaller bundles everything into one file they can double-click. This guide walks through it, including the usual snags.
Why package at all?
Your users should not have to install Python and PyQt just to run your app. Packaging bundles the code, the Python runtime and the Qt libraries into one file or folder. The user double-clicks it and the app opens.
Install PyInstaller
PyInstaller is the most popular tool for this. Install it with pip:
pip install pyinstaller
Build the executable
Point PyInstaller at your main script:
pyinstaller --onefile --windowed app.py
--onefile bundles everything into a single EXE. --windowed hides the black console window, which you want for a GUI app. When it finishes, look in the new dist/ folder for your program.
One file vs one folder
One-file is tidy. You hand over a single EXE. The trade-off is a slightly slower start, because it unpacks itself each time it runs.
One-folder, which you get by dropping --onefile, starts faster and is easier to debug. You share the whole folder instead of one file. Pick based on how you plan to deliver the app.
Icons, names and data files
Polish the result with a few flags. Add an icon with --icon=app.ico. Set the program name with --name=MyApp. If your app loads a .ui file or images, bundle them with --add-data and load them by a path relative to the executable.
Always test the finished EXE on a clean computer that has no Python. That is the only way to be sure nothing is missing.
Fixing common issues
Two problems come up often. If the app cannot find a data file, you forgot to bundle it with --add-data, or you loaded it by the wrong path. If you see a missing Qt plugin error, update PyInstaller — recent versions handle PyQt6 automatically.
When in doubt, run the one-folder build first. Its error messages are easier to read, and you can see exactly what shipped.
Reducing the file size
A packaged PyQt app can be large, because it carries Python and the Qt libraries. You can trim it. Build inside a clean virtual environment that holds only what your app needs, so nothing extra gets swept in.
You can also exclude modules you do not use. A smaller bundle downloads faster and starts quicker, which users notice even if they never read the file size.
Sharing your app
Once you have a working build, think about delivery. For a single file, upload the EXE somewhere and share the link. For a one-folder build, zip the folder first so nothing goes missing.
On some systems, unsigned apps trigger a security warning the first time they run. This is normal for small projects. Tell your users to expect it, or look into code signing for a smoother experience.
Testing the build
The most important step is testing on a clean machine that has no Python installed. That is the only way to be sure every piece shipped. A build that runs on your computer can still fail on someone else's.
Borrow a friend's laptop, use a fresh virtual machine, or spin up a clean user account. If the app opens there, you are ready to share it with confidence.
Why packaging matters
Your app is only useful if people can run it. Most users do not have Python, and asking them to install it is a sure way to lose them. Packaging removes that barrier entirely. You hand over one file, they double-click it, and it works.
It also makes your work feel real. There is a moment of pride when a project goes from "a script on my machine" to "an app my friend is running on theirs". Packaging is the step that crosses that line.
For any tool you want to share, distribute or sell, packaging is not optional. It is the bridge between your code and your users.
Other packaging tools
PyInstaller is the most popular choice, and it handles PyQt6 well. It is not the only option, though. Some developers prefer alternatives that create installers, or tools built for a specific platform's app format.
On Windows you might wrap the result in an installer so users get a proper setup experience. On macOS you can produce an app bundle. On Linux, formats like AppImage bundle everything into a single portable file.
Start with PyInstaller, since it is simple and widely documented. If you later need a polished installer or store-ready package, explore the platform tools once your app is stable.
Key takeaways
Packaging is the bridge between your code and your users. With PyInstaller, one command — using --onefile and --windowed — bundles Python, Qt and your app into something people can double-click, with no Python install required on their side.
Choose one-file for tidiness or one-folder for faster starts and easier debugging. Add an icon and a name, bundle any data files with --add-data, and trim the build by working in a clean virtual environment.
The step you must never skip is testing on a clean machine with no Python. That is the only way to be certain every piece shipped. Pass that test and your app is ready to share with confidence.
FAQs
Is the EXE cross-platform?
No. Build on Windows for a Windows EXE, on macOS for a Mac app, and on Linux for a Linux binary.
Why is my EXE so large?
It includes Python and the Qt libraries. A size of 40 MB or more is normal for a PyQt app.
Can I hide the console window?
Yes. The --windowed flag removes it for GUI apps.
Does the user need to install anything?
No. That is the whole point. The bundle carries everything it needs.
Conclusion
Packaging turns your project into something anyone can run. Install PyInstaller, build with --onefile --windowed, add an icon and any data files, and test on a clean machine. Then share your work with the world. If the build misbehaves, our troubleshooting guide can help.
Ready to start? Download PyQt or run pip install PyQt6.