如题,Pyinstaller在-F单文件模式下打包执行有两个同名exe进程。其中一个是程序进程,另一个是清理进程。参考下图。使用非-F模式,则不存在此问题。
When you build in onefile mode (-F), the program is decompressed to a temporary directory and run from there. The second process is your actual program, while the first process is meant to clean up the temporary directory after the program exits or crashes.
If there were only one process, there would be no way to clean up the temp directory in the event of a crash.
Ref:
Two process instance when i run "exe" which is generated by pyinstaller? #2483