能给我一个如何在 Google Colaboratory 中导入 sagemath 的示例吗?这不起作用:
!pip install sage
from sage.all import *
在 Google Colaboratory 提供 SageMath 之前,有各种 在线使用 SageMath 和/或在 SageMath 上进行协作的方法 工作表:
这对我有用:
问题:
%%bash
source activate sage
安装:
!pip install -q condacolab
import condacolab
condacolab.install()
!conda create -n sage sage python=X # X is version of python, for instance 3.9
现在开始你的程序
%%bash
source activate sage
sage -c '
YOUR CODE HERE
'