刚开始是使用此命令生成exe:pyinstaller -F -w --icon=casc.ico test_accuracy_v1_1_2.py,执行出现
为了查找问题所在,使用此命令生成exe:pyinstaller -F --icon=casc.ico test_accuracy_v1_1_2.py。就是去掉-w,需要用到dos窗口看看问题。
该dos窗口闪一下就没了,需要快速截个屏,截屏后看到弹出下面的错误信息。将图片复制到同一级目录即解决问题。
参考:
https://pyinstaller.readthedocs.io/en/stable/when-things-go-wrong.html#finding-out-what-went-wrong