I am doing some bioinformatics work. I have a python script that at one point calls a program to do an expensive process (sequence alignment..uses a lot of computational pow
This doesn't have anything to do with Python or the subprocess
module. subprocess.Popen
is merely reporting to you the error that it is receiving from the operating system. (What operating system are you using, by the way?) From man 2 fork
on Linux:
ENOMEM fork() failed to allocate the necessary kernel structures
because memory is tight.
Are you calling subprocess.Popen
multiple times? If so then I think the best you can do is make sure that the previous invocation of your process is terminated and reaped before the next invocation.