is there a way to use sagemath in chaquopy

48 views Asked by At

i want to make a mobile app, preferably in Android Studio with Kotlin, where i will use a lot of linear algebra, like finite fields and matrix multiplication. Since i havent found any suitable libraries for java/kotlin i tried to use sagemath. I found Chaquopa lets you use python code in your android studio project and since you can import sage in a normal python project my hope was, that it would work there too. I ran the usual sage -python /your/pythonscript.py and then from sage.all import * in the file. However i get this error com.chaquo.python.PyException: ModuleNotFoundError: No module named 'sage' is there any way to use sage in chaquopy or do i have to use another program to make a android app with such mathematical functions? thx

1

There are 1 answers

0
mhsmith On

Chaquopy does not currently support sagemath, but it does support NumPy and SciPy, which have extensive linear algebra support. You can add them to your app in the pip block of your build.gradle file, as shown here.