pyinstaller 收集到 PyQt5 和 PySide6

问题 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 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值