Packaging Python Applications

Step by Step Guide to Packaging Python GUI applications”

 Book

1st Edition, June 2022

Ready to share your apps?

There is not much fun in creating your own applications if you can't share them with other people, whether publishing it commercially or sharing it online. Distributing your apps allows other people to benefit from your hard work!

Unfortunately, packaging Python applications can sometimes be hard work.

In this book I walk you step-by-step through the process of packaging your own Python applications. Starting with simple examples and working up to complete installers and signed executables.

I've been packaging Python applications for years (honestly, it feels longer). With this book you get the benefit of that experience & save yourself the pain!

This is an early release. You can download the book for free, and still get access to future updates. Please send your feedback so I can make the book better!

Only[[ localizedPrices[774530] ]]

Get the Book

Downloadable ebook (PDF, ePub) & Complete Source code

  • 160+ page ebook of hands-on packaging examples
  • Includes PyQt6, Tkinter, PySimpleGUI, wxPython and Kivy examples in the book
  • Plus PySide2, PySide6 and PyQt5 examples in the source downloads
  • Email support for readers
  • Code free to reuse in your own projects
  • PDF, EPub and Kindle formats
  • Lifetime updates — you get new editions for free.

In the book

Basic concepts and first steps

Starting from the very basics of packaging a Python application with examples in PyQt6, Tkinter, wxPython, PySimpleGUI and Kivy. Learn how to customize your application name and add Window icons.

Simple apps in PyQt6, Tkinter, wxPython, Kivy and PySimpleGUI
Bundling data files with PyInstaller

Learn how to Bundle data files

Include data files with your app, from icons to anything else. Learn how to work with relative paths and ensure your apps work on all platforms.

Package 3rd party modules

Learn how to customize packaging for your apps requirements. Including popular 3rd party modules.

Learn how to troubleshoot builds with includes and excludes.

Packaging 3rd party modules
Installers on Windows, macOS and Linux

Build native installers on Windows, macOS and Linux

Create platform-native installers on Windows, macOS and Linux, including InstallForge EXE setup, macOS Disk Images and Linux deb packaging.

Includes scriptable examples for Linux and macOS to automate your builds.

Every chapter comes with complete, runnable code examples.

Table of Contents

  1. Getting Started with PyInstaller p2-20
    • What is PyInstaller?
    • Installing PyInstaller
    • Packaging My first app
  2. Tweaking your build p21-85
    • Naming your application
    • Application Icons
    • Working with Relative paths
    • Data files & Resources
    • Bundling data folders
    • Hidden imports, Excludes & Binaries
  3. Building Installers p86-113
    • Creating Windows Installers (InstallForge)
    • Creating macOS Disk Images
    • Creating Linux Packages with fpm
  4. Signing Executables p114-119
    • Signing Windows Executables (signtool)
    • Signing macOS Application Bundles
  5. Advanced Packaging p120-150
    • Better Relative Paths
    • Detecting the Current Platform
    • Working with command-line arguments
    • Optimizing Packages
    • PyInstaller Hooks
  6. Troubleshooting p151-162
    • Build doesn't complete
    • Built application doesn't run

Includes working examples in PyQt6, PySide2, PySide6, PyQt5, Tkinter, PySimpleGUI, wxPython and Kivy

Get the Book

Frequently Asked Questions

How will I get my purchase?

After completing your purchase you'll receive an email with a link to get your files and course. Keep it secret, keep it safe.

How do I get updates?

You'll receive an email when new content is available, although you can opt out of this if you wish.

What if I don't like it?

If you decide that it is not for you, just reply to the purchase receipt email within 30 days and I'll issue you with a refund. If you could tell me why, that would be great too but it's not necessary.

I have other questions

If you still have questions just drop me an email