- 积分
- 3632
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-10-21
- 最后登录
- 1970-1-1
|

楼主 |
发表于 2020-7-17 09:46:50
|
显示全部楼层
问题出在spyder!
因为摸索打包时把anaconda乱鼓捣一阵,昨天画图出了些问题,于是重装了anaconda,今天又按照昨天的步骤把conda、pip、anaconda、spyder、python升级一遍,
但是又报了昨天的错误: File "C:\Users\Administrator\Desktop\UI2020.5.11\UI2PY\tip.py", line 30, in <module>
from PyQt5 import QtWebEngineWidgets
ImportError: QtWebEngineWidgets must be imported before a QCoreApplication instance is created
但是,我把py文件在命令行中执行居然正常弹出窗口:
(base) C:\Users\Administrator>cd C:\Users\Administrator\Desktop\UI2020.5.11\UI2PY
(base) C:\Users\Administrator\Desktop\UI2020.5.11\UI2PY>python tip.py
看来,还是spyder编辑器有问题!
具体说来,spyder对Qt中网页控件WebEngine的支持有问题,对其他的控件尚未发现问题。
|
|