5

Can I have an example of how to import sagemath in Google Colaboratory? This doesn't work:

!pip install sage
from sage.all import *
Giovanni Funchal
  • 8,934
  • 13
  • 61
  • 110

2 Answers2

6

Until Google Colaboratory provides SageMath, there are various ways to use SageMath online and/or to collaborate on SageMath worksheets:

Samuel Lelièvre
  • 3,212
  • 1
  • 14
  • 27
5

Sage isn't just a pip-installable package; there's currently no easy way to use sage directly from Colab.

(Note that the pip install sage command above is installing a completely different package; there's also a sagemath package, but that doesn't include all the components of sage.)

Craig Citro
  • 6,505
  • 1
  • 31
  • 28