问题 PyInstaller does not support multiple Qt bindings
Aborting build process due to attempt to collect multiple Qt bindings packages: attempting to run hook for 'PyQt5', while hook for 'PySide6' has already been run! PyInstaller does not support multiple Qt bindings packages in a frozen application - either ensure that the build environment has only one Qt bindings package installed, or exclude the extraneous bindings packages via the module exclusion mechanism (--exclude command-line option, or excludes list in the spec file).
方案1, 保留一个
保留一个Qt bindings package, 要么 pip uninstall PySide6, 保留PyQt5; 要么 pip uninstall PyQt5,保留 PySide6。
方案2, --exclude
要么排除PyQt5,保留PySide6。pyinstaller --onefile --exclude PyQt5 .\gui_qt.py
要么排除PySide6,保留PyQt5。pyinstaller --onefile --exclude PySide6.\gui_qt.py