A powerful GUI application that simplifies converting Python scripts to standalone executables using PyInstaller, featuring intelligent error detection and auto-fixing, automatic hidden import resolution, comprehensive notifications, and PyInstaller version management. The converter automatically solves common PyInstaller errors without requiring manual intervention.
π Intelligent Dependency Analysis and Hidden Imports
- π Smart Import Detection: Automatically scans Python files to identify all imports and dependencies
- π Problematic Package Database: Contains a comprehensive database of packages known to cause PyInstaller issues
- π§© Automatic Hidden Import Resolution: Identifies and adds necessary hidden imports without manual intervention
- π Submodule Detection: Recognizes when specific submodules need to be included as hidden imports
- π¦ Package Relationship Analysis: Understands dependencies between packages to ensure complete inclusion
- π§ Learning from Errors: Adds missing imports discovered during failed conversion attempts
- π§ Intelligent Error Analysis: Automatically detects, diagnoses, and fixes common PyInstaller errors in real-time
- π Multi-Attempt Conversion: Makes up to 3 conversion attempts, applying incremental fixes between attempts
- π§ͺ Pattern Recognition: Uses advanced regex patterns to identify specific error types in conversion output
- π DLL Error Resolution: Automatically detects missing DLLs and adds them from System32 when available
- π Detailed Error Logging: Provides clear explanations of errors and the fixes being applied
- π‘ Solution Suggestions: Offers specific solutions for errors that can't be automatically fixed
- π Real-time progress updates with percentage completion
- π Notifications when conversion is complete
- π Detailed logs of the conversion process
- β‘ Fast Mode for skipping non-essential analysis steps
- π Selective module exclusion based on actual imports
- β±οΈ Timeout detection for hanging processes
- π Sound alerts when conversion completes or fails
- π¬ System tray notifications with completion status
- β° Timestamps for all conversion events
- π₯οΈ Desktop notifications when process finishes
- π Automatically detects PyInstaller installation status
β οΈ Warns about outdated or missing PyInstaller versions- π Shows detailed update instructions in the GUI
- π One-click copy of update commands
- π "Check Again" button to verify installation after updating
- π Tabbed interface for basic, advanced, logs, and troubleshooting
- π§ Comprehensive troubleshooting guide with common problems and solutions
- π Log viewer with save and clear options
- π Detailed error analysis and suggestions
- Python 3.6 or higher
- PyInstaller 5.6.2 or higher (recommended)
- PyQt5 (version 5.15.0 or higher)
- Other dependencies listed in
requirements.txt
- Clone this repository or download the source code:
git clone https://github.com/zinzied/SimplePyInstallerGui-Enhanced.git
cd SimplePyInstallerGui-Enhanced
- Install the required dependencies:
pip install -r requirements.txt
- Run the application:
python py2exe.py
- π Select a Python file to convert
- π Choose an output directory
- βοΈ Configure basic options:
- Output type (single executable or folder)
- Window mode (console or windowed)
- β Enable auto-detect dependencies and auto-fix errors (recommended)
- π Click "Convert to EXE"
π§© Hidden Imports Management
- Automatic Detection: Let the app automatically detect and add required hidden imports
- Manual Addition: Add specific hidden imports that you know are needed
- Import Database: Benefit from the app's database of known problematic packages and their required imports
- Dynamic Learning: The app learns from conversion errors and adds missing imports automatically
- Multiple File Selection: Select multiple files at once to include in your executable
- Directory Support: Add entire directories with automatic destination path assignment
- Destination Path Editing: Double-click any item to edit its destination path
- Batch Operations: Select multiple items for removal or editing
- πΌοΈ Specify an icon for the executable
- π§Ή Clean build files before building (--clean)
- βοΈ Strip binaries to reduce size (--strip)
- π Request UAC elevation (--uac-admin)
- π Generate and edit a .spec file for more control
- β¨οΈ Add custom command-line options
- β‘ Fast Mode: Speeds up conversion by skipping non-essential analysis steps
- π Skip Validation: Further speeds up conversion but may be less reliable
- π Verbose Output: Shows detailed output from PyInstaller for debugging
- π Enable/disable sound notifications for completion and errors
- π¬ System tray notifications with status information
- β° Timestamps for all conversion events
- π Visual alerts for important events
The application includes powerful error detection and auto-fixing capabilities:
The converter automatically detects and fixes these common errors:
- π¦ Missing Module Errors: Identifies and adds required hidden imports
- π DLL Load Failures: Detects missing DLLs and adds them from System32
- π« Failed Execution Errors: Adds debug options to get more information
- π Recursion Errors: Excludes problematic modules causing circular imports
- πΌοΈ Qt Binding Conflicts: Special handling for multiple Qt frameworks (PyQt5/PyQt6)
- π§© Tkinter Issues: Adds necessary tkinter submodules as hidden imports
- π File Not Found Errors: Suggests adding missing files as data files
- π€ Unicode/Encoding Errors: Adds appropriate encoding options
- π» Terminal Application Issues: Detects terminal applications and warns if using windowed mode
- Error Detection: Parses conversion output using regex patterns to identify specific errors
- Solution Application: Automatically applies the appropriate fix based on error type
- Retry Mechanism: Makes up to 3 conversion attempts, applying fixes between attempts
- Detailed Logging: Provides clear explanations of errors and fixes in the logs
The dedicated troubleshooting tab provides detailed solutions for issues that may require manual intervention:
- π Common Problems Database: Extensive collection of PyInstaller issues and solutions
- π Error Lookup: Find solutions for specific error messages
- πΌοΈ Special Qt Section: Detailed guidance for handling Qt framework issues
- π§ Step-by-Step Solutions: Clear instructions for resolving complex problems
- π View real-time logs during conversion
- πΎ Save logs for further analysis
- π§Ή Clear logs when needed
The application automatically checks if your PyInstaller version is up to date:
- π Detects the installed version of PyInstaller (or if it's missing)
β οΈ Shows a warning if the version is outdated or not installed- π Provides the exact command to install or update PyInstaller
- π Allows copying the update command with one click
- π "Check Again" button to verify installation after updating
- π‘οΈ Prevents conversion attempts with incompatible PyInstaller versions
- Intelligent Error Analysis: The converter now automatically detects and fixes common PyInstaller errors
- Multi-Attempt Conversion: Makes up to 3 conversion attempts, applying incremental fixes between attempts
- Detailed Error Logging: Provides clear explanations of errors and the fixes being applied
- Automatic Detection: Identifies terminal applications by analyzing code patterns
- Smart Mode Selection: Warns if a terminal application is being built with windowed mode
- Comprehensive Guidance: Detailed troubleshooting section for terminal application issues
- Path Resolution Help: Code templates for handling file paths correctly in packaged applications
π§© Improved Hidden Imports Management
- Automatic Detection: Significantly improved detection of required hidden imports
- Expanded Database: Added more known problematic packages and their required imports
- Dynamic Learning: The app now learns from conversion errors and adds missing imports automatically
- Multiple File Selection: Now supports selecting multiple files at once
- Improved Directory Handling: Better support for adding directories with automatic destination paths
- Destination Path Editing: Double-click any item to edit its destination path
This project is licensed under the MIT License - see the LICENSE file for details.
- PyInstaller for the amazing tool that makes Python to EXE conversion possible
- PyQt5 for the GUI framework
- All contributors and users who have provided feedback and suggestions
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request