Unfortunately, I never called a Python script from C++, so I cannot be really helpful here. 
A hang often comes from some multiprocessing issues / mismatches, so if possible, I would try to scale down the problem and use as few threads/processes as possible.