PyEmbedBuilder is a user-friendly GUI for creating portable, open-source Python applications that you can share with other Windows users who donβt feel confident setting up a full Python environment themselves. It uses a .bat file to launch your (.py) Python app in a clear and secure way. It lunches as easily as any regular (.exe) executable software, but without the need to compile binary executables or pay hundreds of dollars to have your apps signed. It fully exposes the launcher and application source code to all end users, making it better suited for open for security audits open-source distribution rather than fully closed-source software. Iβm simply sharing it with anyone interested, as I originally built this tool for my own use.
It automates the complex process of downloading embedded Python distributions, verifying their integrity, bootstrapping pip, installing dependencies, and securely extracting official components (like Tcl/Tk for Tkinter support) into a clean, portable folder structure.
Security is the core design principle of PyEmbedBuilder:
- Strict Verification: All downloads from
python.orgare verified. - HTTPS Only: Enforced TLS for network operations.
- Audit Trail: Generates a comprehensive
security_audit.logfor every build, recording source URLs. - Path Sanitization: Automatically strips absolute paths from
pipmetadata (.dist-info) to prevent and minimize local system information leakage when distributing portable apps with embedded environments. - Zip-Slip Protection: Validates all archive extractions against directory traversal attacks.
- Wizard-Style Interface: Modern, accessible Tkinter GUI with Dark/Light Mode, High Contrast Accessibility Mode and text scaling support.
- Full Python Support:
- Download any stable Python version (β₯ 3.12.10).
- Optional Component Extraction: Automatically add
Scripts,tcl,Lib,libs, andincludefoldersβenabling full standard library support (includingtkinter) in a portable embedded environment.
- Dependency Management: Import your
requirements.txtto pre-install packages into the portable environment. - Portable Output:
- Generates
.batlaunchers automatically. - Configures
._pthfiles correctly for full isolation. - Creates fully independent and portable Python environments in a
..\My Projects\folder by default.
- Generates
- Smart Caching: Optional downloads cache to save bandwidth when creating multiple similar projects (by default builder auto-clears cache upon each successful build).
Download the release archive and its signature:
PyEmbedBuilder_(version).7zPyEmbedBuilder_(version).7z.sha256
Verify the integrity (PowerShell):
Get-FileHash .\PyEmbedBuilder_(version).7z -Algorithm SHA256
# Compare output with the content of PyEmbedBuilder_(version).7z.sha256PyEmbedBuilder is fully portable. No installation is required. It has been successfully built with a running instance of itself. The standalone portable version has been compressed with free 7-Zip software. To avoid any issues with .7z archives, I advise installing the free official 7-Zip software for Windows, available here.
- Extract
PyEmbedBuilder.7zto a location of your choice (e.g.,C:\PyEmbedBuilder). - Navigate to the extracted folder.
Double-click launch_pyembed_builder.bat to start the application.
- Create Project:
- Name your project.
- Select a Python version (Recommended or Custom).
- (Optional) Select a
requirements.txtfile. - (Recommended) Check "Add full stdlib..." to include Tkinter, pip, and standard headers.
- Review: Check the build plan and security parameters.
- Build: Watch the automated process:
- Download & Verification
- Core Extraction
- Optional Components Extraction
- pip Bootstrap
- Optional Packages Installation (requirements.txt)
- Paths Sanitization
- Complete: By default your portable environment is ready in
..\My Projects\<Project-Name>.
The builder creates self-contained environments structured for distribution:
My Projects/
βββ Project-Name/
βββ launch.bat # Your App Launcher
βββ (your_app_here).py # Entry Point to Your Python Application
βββ install_dependencies.bat # Add new libraries/packages
βββ list_dependencies.bat # List all currently installed libraries/packages
βββ uninstall_dependencies.bat # Remove any libraries/packages
βββ requirements.txt # List of recomended required libraries in the current Python project (provide your own when building)
βββ build_manifest.json # App manifest for debuging (remove it before public distribution)
βββ python-embed/ # The portable Python environment
β βββ python.exe # Python CLI Shell Binary
β βββ pythonw.exe # Python Window Mode Shell Binary
β βββ Lib/ # Standard library & site-packages
β βββ Scripts/ # Pip and other CLI tools
β βββ ...
βββ ...
Disclaimer: This is a very early working alpha version of the software. Always test and verify your portable Python apps before sharing them with others.