有没有办法在chaquopy中使用sagemath

问题描述 投票:0回答:1

我想制作一个移动应用程序,最好是在带有 Kotlin 的 Android Studio 中,我将在其中使用大量线性代数,例如有限域和矩阵乘法。由于我还没有找到任何合适的 java/kotlin 库,我尝试使用 sagemath。我发现 Chaquopa 允许您在 android studio 项目中使用 python 代码,并且由于您可以在普通的 python 项目中导入 sage,所以我希望它也能在那里工作。我在文件中运行了通常的

sage -python /your/pythonscript.py
然后
from sage.all import *
。但是我收到这个错误
com.chaquo.python.PyException: ModuleNotFoundError: No module named 'sage'
有什么方法可以在 chaquopy 中使用 sage 或者我必须使用另一个程序来制作具有此类数学函数的 Android 应用程序?谢谢

android sage chaquopy
1个回答
0
投票

Chaquopy 目前不支持 sagemath,但它支持 NumPy 和 SciPy,它们具有广泛的线性代数支持。您可以将它们添加到您的应用程序的 build.gradle 文件的

pip
块中,如此处所示。

© www.soinside.com 2019 - 2024. All rights reserved.