pythonsagegoogle-colaboratory

How do you import sagemath in Google Colaboratory?


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

!pip install sage
from sage.all import *

Solution

  • 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.)