Skip to content
MrBooks36 edited this page Oct 13, 2025 · 1 revision

PyCompyle Wiki

Welcome to the PyCompyle wiki! This is your central hub for all documentation, guides, examples, and advanced usage tips for PyCompyle, the Python packaging tool by MrBooks36.

PyCompyle allows you to package Python scripts into standalone executables (EXE) while keeping the project as close to its raw form as possible. Whether you’re creating small utilities or full applications, PyCompyle helps you manage dependencies, optimize builds, and deploy your Python projects efficiently.


Table of Contents


Overview

PyCompyle is designed to simplify packaging Python scripts into EXE files. It provides fine-grained control over build options, supports adding missing dependencies, and allows you to customize the final executable with icons, UAC prompts, and more.


Features

  • Package Python scripts into standalone EXE files.
  • Skip confirmation dialogs for faster builds.
  • Specify a custom icon for your EXE.
  • Include additional Python packages not automatically detected.
  • Enable verbose output to see detailed build steps.
  • Create windowed applications without a console.
  • Retain build files for debugging or reuse.
  • Use debugging tools for in-depth error tracking.
  • Copy specific files or folders into the build directory.
  • Force refresh essential files from GitHub.
  • Add a UAC (User Account Control) prompt to the executable.

Installation

Requirements: Python 3.6 or higher.

To install PyCompyle:

  1. Visit the Releases page for the latest version.
  2. Download the installer.py script.
  3. Run the installer:
python installer.py

This will install PyCompyle directly into your site-packages directory.


Usage

Basic command format:

python -m PyCompyle source_file.py

Key Arguments

  • -nc, --noconfirm: Skip confirmation dialogs.
  • -f, --folder: Build to a folder instead of onefile EXE.
  • -zip, --zip: Build a zip file version.
  • -bat, --bat: Use a .bat file instead of an EXE (implies --folder).
  • -i, --icon: Specify a custom icon.
  • -p, --package: Add a package that might be missed automatically (repeatable).
  • -v, --verbose: Enable verbose output.
  • -w, --windowed: Build a windowed application.
  • -k, --keepfiles: Keep the build files.
  • -d, --debug: Enable all debugging tools (overrides some defaults).
  • -c, --copy: Copy specific files or folders into the build directory (case-sensitive).
  • -uac, --uac: Add a UAC prompt.
  • --force-refresh: Remove cached files and reinstall components.
  • --disable-compressing: Disable file compression.
  • --disable-password: Disable password protection on onefile EXE.

Example Command

This example packages my_script.py into an EXE with advanced options:

python -m PyCompyle --force-refresh --icon="myicon.ico" --verbose --windowed --package=numpy --package=ollama my_script.py

Advanced Usage

  • Adding linked imports: If a dependency isn’t detected automatically, open an issue with the linked imports enhancement label.
  • Debugging builds: Use --debug to retain build files, enable verbose output, and troubleshoot issues.
  • Custom packaging: Combine --folder, --zip, or --bat options to control the format and startup method of your executable.

Contributing

Contributions are welcome! You can:

  • Submit issues for bugs or feature requests.
  • Open a pull request to improve functionality.
  • Report missing linked imports for better dependency handling.

License

This project is licensed under the terms specified in LICENSE.md.

Clone this wiki locally