CEngine (Convert Engine) is a powerful Rust-based tool for converting Python scripts into standalone executables.
CEngine is an open-source converter that streamlines the process of creating executables from Python scripts. It handles the entire workflow automatically:
- Creates a virtual environment
- Analyzes and detects required packages
- Installs dependencies
- Builds the executable
- Cleans up temporary files
- Smart Import Detection: Automatically scans your Python script to identify required packages
- Virtual Environment Management: Creates and configures isolated environments for clean builds
- Dependency Resolution: Handles package installation, including special cases like PyWin32 and OpenCV
- Build Optimization: Creates optimized executables with minimal size
- Automatic Cleanup: Removes temporary build files after completion
- Cross-Platform Support: Works on Windows, macOS, and Linux
- Debug Mode: Detailed logging for troubleshooting
- Force Mode: Override warnings and proceed with operations
- Download the latest Windows executable from the Releases page
- Download
cengine-windows-x64.exe
- Add the executable to your PATH or run it directly
- Download the latest Linux binary from the Releases page
- Download
cengine-linux-x64
- Make it executable:
chmod +x cengine-linux-x64
- Move it to a directory in your PATH:
sudo mv cengine-linux-x64 /usr/local/bin/cengine
For Arch Linux users, CEngine is available in the AUR:
yay -S cengine
paru -S cengine
git clone https://aur.archlinux.org/cengine.git
cd cengine
makepkg -si
CEngine (Convert Engine) is an open-source converter for Python to create exe from py files.
Usage: cengine <SCRIPT> [OPTIONS] [PYINSTALLER_ARGUMENTS]
Arguments:
[SCRIPT] Define a script to be made into an executable
Options:
-n, --name <NAME> Define the script name
--add-imports <IMPORTS>... Add more imports
--force-platform <PLATFORM> Add custom arguments
--clean Clean failed builds
--debug Sets the debug environment to true
--force Forces the operation to proceed with all warnings and skippings
-h, --help Print help
-V, --version Print version
cengine test.py
cengine test.py --name test
cengine test.py --force-platform linux --add-imports numpy
cengine test.py --name test --clean