问题描述:
使用PyInstaller打包Python程序,在运行exe文件时,出现内存爆满,
问题原因:
在Python程序中包含了多进程或多线程代码
例如Pool()进程池
解决方法:
引入freeze_support
from multiprocessingimport freeze_support
if __name__ =='__main__':
freeze_support()
使用PyInstaller打包Python程序,在运行exe文件时,出现内存爆满,
在Python程序中包含了多进程或多线程代码
例如Pool()进程池
引入freeze_support
from multiprocessingimport freeze_support
if __name__ =='__main__':
freeze_support()