pip install pyinstaller
pyinstaller --noconfirm --onefile --console "path\to\your\script.py"
pyinstaller --noconfirm --onefile --console --icon "path\to\your\icon_file.ico" "path\to\your\script.py"
pip install pyinstaller
pyinstaller --noconfirm --onefile --console "path\to\your\script.py"
pyinstaller --noconfirm --onefile --console --icon "path\to\your\icon_file.ico" "path\to\your\script.py"