在Pool前面加上这参数设置这两行代码 import multiprocessing multiprocessing.set_start_method('spawn', True) from multiprocessing import Pool