7

How can I configure multiprocessing in Windows to use the 'forkserver' method? whenever I start up IPython console and type:

import multiprocessing
multiprocessing.set_start_method('forkserver')

the error:

ValueError: cannot find context for 'forkserver'

occurs.

Amin Marshal
  • 183
  • 2
  • 10

1 Answers1

10

forkserver is only available in Python 3.4+ and only on some Unix platforms (not on Windows).

From the documentation:

forkserver

Available on Unix platforms which support passing file descriptors over Unix pipes.

Changed in version 3.4: [...] forkserver added for some unix platforms.

The reason forkserver is not available on Windows is that it relies on fork(), and there is no fork() on Windows. For more information, see How can I start a sub-process in Windows?

NPE
  • 486,780
  • 108
  • 951
  • 1,012