I'm not able to get multiprocessing to work in spawn mode on macOS when using pyinstaller. The following script runs fine in the interpreter, but when using pyinstaller it enters an infinite recursive loop that keeps starting new processes.
I'm using Python 3 from Anaconda (Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12) ), on macOS 10.12.2, with the development version of pyinstaller (3.3.dev0+483c819).
import sys
from multiprocessing import freeze_support, set_start_method, Process
def test():
print('In subprocess')
if __name__ == '__main__':
print(sys.argv,)
freeze_support()
set_start_method('spawn')
print('In main')
proc = Process(target=test)
proc.start()
proc.join()
I'm not able to get multiprocessing to work in spawn mode on macOS when using pyinstaller. The following script runs fine in the interpreter, but when using pyinstaller it enters an infinite recursive loop that keeps starting new processes.
I'm using Python 3 from Anaconda (Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul 2 2016, 17:52:12) ), on macOS 10.12.2, with the development version of pyinstaller (3.3.dev0+483c819).