Process finished with exit code 137 in PyCharm Process finished with exit code 137 in PyCharm python python

Process finished with exit code 137 in PyCharm


Exit code 137 means that your process was killed by (signal 9) SIGKILL . In the case you manually stopped it - there's your answer.

If you didn't manually stop the script and still got this error code, then the script was killed by your OS. In most of the cases, it is caused by excessive memory usage.


{In my experience}

this is because of Memory issue. When I try to train ml model using sklearn fit with full data set , it abruptly breaks and gives whereas with small data it works fine.

Process finished with exit code 137 (interrupted by signal 9: SIGKILL)Interestingly this is not caught in Exception block either


It's not always a memory issue. In my case subprocess.Popen was utilized and it was throwing the error as 137 which looks like signalKILL and the cause is definitely not the memory utilization, because during the runtime it was hardly using 1% of memory use. This seems to be a permission issue after more investigation. I simply moved the scripts from /home/ubuntu to the root directory.