python 3 script keeps failing to finish if I import os.system or subprocess.run first, then use matlab.engine to connect to matlab. As shown in the code below, my script will be stuck/hanged forever.
# the following code cannot finish running
os.system("matlab -r \"matlab.engine.shareEngine\"")
What causes the issue that the script can't finish? How can I import os/subprocess and matlab.engine together in the header?