Fix problem about embedded python interpreter, reference: https://docs.python.org/2/c-api/init.html#thread-state-and-the-global-interpreter-lock