- Python 3.x installed on your system
- Virtual environment (venv) module installed
- Clone the repository to your local machine.
- Navigate to the project directory.
- Open a terminal or command prompt.
- Create a virtual environment by running the following command:
python -m venv myenv
- Activate the virtual environment:
- On Windows:
myenv\Scripts\activate
- On macOS and Linux:
source myenv/bin/activate
- On Windows:
- Make sure you are in the project directory and the virtual environment is activated.
- Install the required packages by running the following command:
pip install -r requirements.txt
using Loguru python package for loggin
logger.info("This is info")
logger.debug(f"This is input file: {input_file}")
logger.error("Error occured, check error.txt")
pip install -r requirements.txt
Using PySimpleGUI for graphical user interface. Add layout according to your need.
For printing in pyGuiSimple output, use print
print("This will print in PyGuiSimple output console")
pyinstaller.exe --onefile ./<PYTHON_FILE_NAME>.py
pyinstaller --onefile --icon=PATH_TO_ICON gui.py
python3 -m PyInstaller --windowed ./<PYTHON_FILE_NAME>.py
--- The issue
pyinstaller --windowed myapp.py
cd dist/myapp.app/Contents/MacOs
mkdir tcl tk
cp -R /Library/Frameworks/Python.framework/Versions/3.7/lib/tcl* tcl/
cp -R /Library/Frameworks/Python.framework/Versions/3.7/lib/tk* tk/
cp -R /Library/Frameworks/Python.framework/Versions/3.7/lib/Tk* tk/
The executable file will be found in script->script.app(show contained files)->MacOs->script.app