PyRun_File 's Invoke problem

I am working at centos7.9,
here is python,c and env info:

python version: 3.6.8 (default, Jun 20 2023, 11:53:23) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)]

When I use PyRun load a python script. if I add scipy.stats modules in .py
the calling thread will be hanging. the .py script is like this:

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# paramsIn => resultOut 
# from jsonStr => j =  bytearray(byte_data);sonStr
# author: fengxh Sep04,2023

import json
import binascii
import numpy as np;
import sys
# the next  two lines all could make PyRun_File hang....
#from scipy.stats import kurtosis  #cannot exec in python c envirmento.
#import scipy as sci

Even I havn’t use scipy function at all, the calling will be hanging…

Try connecting gdb to the hung process and look at the stack to see what is going on.

#0 0x00007ffff7bcade2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/
(gdb) thread 4
[Switching to thread 4 (Thread 0x7fffe5c68700 (LWP 103353))]
#0 0x00007ffff7bcaa35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/
(gdb) thread 5
[Switching to thread 5 (Thread 0x7fffe5467700 (LWP 103354))]
#0 0x00007ffff7bcaa35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/
(gdb) thread 6
[Switching to thread 6 (Thread 0x7fffe4c66700 (LWP 103355))]
#0 0x00007ffff7bcaa35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/

main thread:
#0 0x00007ffff6678c19 in pselect () from /lib64/
#1 0x00007ffff75a1244 in mosquitto_loop (mosq=mosq@entry=0x8284d0, timeout=timeout@entry=-1, max_packets=max_packets@entry=1) at loop.c:135
#2 0x00007ffff75a14b3 in mosquitto_loop_forever (mosq=0x8284d0, timeout=-1, max_packets=1) at loop.c:269
#3 0x0000000000405513 in main_normal () at /home/hxjd/src/src_shake/main/main.c:95
#4 0x00000000004054a4 in main (argc=1, argv=0x7fffffffe078) at /home/hxjd/src/src_shake/main/main.c:72

It seems I encountered deadlock.
Does PyRun_File() support async_invoke_interface?

Its not documented as supporting async.