Trying to build with Ninja results in an AttributeError.

I am able to build my project, but when I try to flash it to the board via ninja flash_<target> I can select the device in, I know, that I have to use "'0'" as input, so that the script doesn't result in an error, but then I get the following error:

nrf5_SDK_for_Mesh_v4.0.0_src/CMake/", line 93, in main
with multiprocessing.Pool(len(devices)) as p:
AttributeError: __exit__

Is there a way to fix this?