Skip to content

zinzied/SimplePyInstallerGui-Enhanced

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Python to EXE Converter - Enhanced

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.

Python to EXE Converter PyInstaller Platform

✨ Features

πŸ”„ 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

πŸ› οΈ Advanced Error Detection and Auto-Fixing

  • πŸ”§ 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

πŸ“Š Progress Tracking

  • πŸ“ˆ Real-time progress updates with percentage completion
  • πŸ”” Notifications when conversion is complete
  • πŸ“ Detailed logs of the conversion process

βš™οΈ Performance Optimization

  • ⚑ Fast Mode for skipping non-essential analysis steps
  • πŸ”„ Selective module exclusion based on actual imports
  • ⏱️ Timeout detection for hanging processes

πŸ”” Notification System

  • πŸ”Š Sound alerts when conversion completes or fails
  • πŸ’¬ System tray notifications with completion status
  • ⏰ Timestamps for all conversion events
  • πŸ–₯️ Desktop notifications when process finishes

πŸ”„ PyInstaller Version Management

  • πŸ” 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

🎨 User-Friendly Interface

  • πŸ“‘ 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

πŸ“‹ Requirements

  • 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

πŸš€ Installation

  1. Clone this repository or download the source code:
git clone https://github.com/zinzied/SimplePyInstallerGui-Enhanced.git
cd SimplePyInstallerGui-Enhanced
  1. Install the required dependencies:
pip install -r requirements.txt
  1. Run the application:
python py2exe.py

πŸ“– Usage

Basic Usage

  1. πŸ“‚ Select a Python file to convert
  2. πŸ“ Choose an output directory
  3. βš™οΈ Configure basic options:
    • Output type (single executable or folder)
    • Window mode (console or windowed)
  4. βœ… Enable auto-detect dependencies and auto-fix errors (recommended)
  5. πŸš€ Click "Convert to EXE"

Advanced Options

🧩 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

πŸ“ Additional Files and Resources

  • 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

βš™οΈ Other Advanced Options

  • πŸ–ΌοΈ 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

Performance 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

Notification Options

  • πŸ”Š Enable/disable sound notifications for completion and errors
  • πŸ’¬ System tray notifications with status information
  • ⏰ Timestamps for all conversion events
  • πŸ”” Visual alerts for important events

πŸ”§ Automatic Error Detection and Resolution

The application includes powerful error detection and auto-fixing capabilities:

πŸ” Automatically Detected Errors

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 Resolution Process

  1. Error Detection: Parses conversion output using regex patterns to identify specific errors
  2. Solution Application: Automatically applies the appropriate fix based on error type
  3. Retry Mechanism: Makes up to 3 conversion attempts, applying fixes between attempts
  4. Detailed Logging: Provides clear explanations of errors and fixes in the logs

πŸ“‹ Comprehensive Troubleshooting Tab

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

πŸ“‹ Logs

  • πŸ“Š View real-time logs during conversion
  • πŸ’Ύ Save logs for further analysis
  • 🧹 Clear logs when needed

πŸ”„ Version Checking

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

πŸ”„ Recent Updates

✨ New Features

πŸ› οΈ Enhanced Error Detection and Auto-Fixing

  • 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

πŸ’» Terminal Application Support

  • 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

πŸ“ Enhanced File Management

  • 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

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™ Acknowledgements

  • 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

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request