title: Run Python from C++ on Android using NDK
body: <p>I want to run some Python code from Android through JNI using NDK like this:</p>
  <pre><code>#include &lt;jni.h&gt;
  #include &lt;string&gt;
  #include &lt;stdio.h&gt;
  
  #include &lt;Python.h&gt;
  
  extern &quot;C&quot; JNIEXPORT jstring JNICALL
  Java_com_example_mypythonapplication_MainActivity_stringFromJNI(
          JNIEnv* env,
          jobject /* this */)
  {
      std::string command = &quot;print('Hello World from Python!!!')&quot;;
  
      PyObject* pInt;
  
      Py_Initialize();
  
      PyRun_SimpleString(command.c_str());
  
      Py_Finalize();
  
      std::string message = &quot;Command &quot;;
      message.append(command);
      message.append(&quot; was executed successfully!&quot;)
  
      return env-&gt;NewStringUTF(message.c_str());
  }
  </code></pre>
  <p>Are there prebuilt <code>libpython</code> available for Android or is there any way to cross compile it in order to be able to achieve that?</p>