← All guides Guide

How to sign a PyInstaller exe

Updated November 18, 2026. Leer en español, Ler em português, Türkçe oku

Install the tool with pip install bamboodeploy, build with PyInstaller, then run bamboo-sign sign dist\app.exe. The exe is scanned, signed and written back in place, and Windows shows a verified publisher instead of Unknown publisher. Signing, together with version info and no UPX, is the usual fix for the generic antivirus detections PyInstaller builds attract.

Why PyInstaller builds get flagged

1. Install the tool and set your API key

pip install bamboodeploy

Create a key in the dashboard under API Keys. It starts with bd_live_. Save it for your Windows user, then open a new terminal so it sees the new variable:

setx BAMBOO_API_KEY bd_live_...

A .bamboorc file in your user folder with the line BAMBOO_API_KEY=bd_live_... works too.

The package is pure standard library, for Python 3.8 or newer, and does not need Node.

2. Build with version info and without UPX

pyi-grab_version writes a version file from any exe that has one, such as your Python's python.exe. Change every field to your own company, product and version, then pass the file to PyInstaller:

pyi-grab_version path\to\python.exe
pyinstaller --onefile --noupx --version-file file_version_info.txt app.py

Replace all of the copied values: a file that still names another company as its maker is refused for signing.

3. Scan, then sign

bamboo-sign scan dist\app.exe --fail-on-findings
bamboo-sign sign dist\app.exe

The scan is free and shows what antivirus engines see; --fail-on-findings stops a release script when it finds something. If bamboo-sign is not on PATH, python -m bamboodeploy sign dist\app.exe does the same.

onedir builds, Nuitka and cx_Freeze

In a onedir build, sign dist\app\app.exe and any extension modules or DLLs you compiled yourself. A python3XX.dll from a python.org install already carries the Python Software Foundation's signature. Nuitka and cx_Freeze builds are signed the same way: run bamboo-sign sign on the exe they produce. If you wrap the app in an installer, sign that as well; the Inno Setup guide covers the common case.

Smart App Control

On Windows 11 with Smart App Control on, a blocked program has no Run anyway button. Smart App Control lets a file with a valid signature run, and it checks every exe and DLL as it loads, not only the file the user downloaded. Sign the exe, the extension modules and DLLs you build, and the installer.

Common errors

bamboo-sign prints the reason and exits with one of these codes:

Exit codeMeaningWhat to do
1Bad or missing API key, file not found, or signing denied or failedRead the printed message. Check BAMBOO_API_KEY and the file path.
2Signing needs a Premium planUpgrade in the dashboard.
3Fewer than two verified connectionsVerify your email plus a domain, GitHub or similar under Connections in the dashboard.
4Timed out waiting for the signatureThe build may be waiting for review. Run the same command again once it is approved.

FAQ

Should I switch from PyInstaller to Nuitka?

Nuitka compiles to C, so its output looks different to scanners, but an unsigned Nuitka build can still be flagged. Sign whichever you use.

Does reporting a false positive to Microsoft fix it?

It clears that one file. The next build has a new hash and can be flagged again, while the publisher in a signature stays the same from build to build.

Does it work in GitHub Actions?

Yes. Run pip install bamboodeploy in the job, set BAMBOO_API_KEY from a secret, and call bamboo-sign sign after pyinstaller.

Whose name does Windows show as the publisher?

Ours. We sign your build with our EV code signing certificate, so Windows shows our verified publisher name instead of Unknown publisher. You need no certificate, company registration or USB token of your own.

Does signing remove the SmartScreen warning at once?

Not on its own. A valid signature replaces Unknown publisher with a verified publisher, and Smart App Control lets a signed file run. SmartScreen also weighs reputation, which builds as people download and run your files, and no certificate grants it instantly, EV included. See EV certificates no longer skip SmartScreen.

What do I need before I can sign?

A Bamboo Deploy account, an API key from the dashboard, a Premium plan and two verified connections: your email plus a domain, GitHub or similar. Uploading and scanning are free.

Bamboo Deploy scans every build and signs it with our EV certificate, so you need no certificate, no company registration and no USB token of your own. Get started, or read the docs.

Other guides