I am using the chaquopy demo for running python in android.
(Taken from GitHub https://github.com/ericdecanini/HelloChaquopy)
My test1 function returns string.
When I added the import numpy as np line the application stopped running.
In the logcat i get:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ericdecanini.chaquopytesttwo/com.ericdecanini.chaquopytesttwo.MainActivity}: com.chaquo.python.PyException: ModuleNotFoundError: No module named 'numpy'`
Please let me know what I am missing.
import numpy as np
import time
import math
def test1():
x = math.sin(3.14159/2.0)
str1 = "%.2f" % x
str2 = time.strftime("%a, %d %b %Y %H:%M:%S +0000", time.gmtime())
return " --- OK --" + str1 + "\n --- " +str2 + "\n --- "
Note: when I commented out the import to numpy it run OK.