pyinstaller 收集到 PyQt5 和 PySide6

问题 PyInstaller does not support multiple Qt bindings 

pyinstaller 收集到 PyQt5 和 PySide6

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 

版权声明:如无特殊标注,文章均来自网络,本站编辑整理,转载时请以链接形式注明文章出处,请自行分辨。

本文链接:https://www.shbk5.com/dnsj/75086.html