Ask Your Question

Revision history [back]

If you use run, then the .sage file is understood as an independent Python script, hence you should import the required modules, e.g.

from sage.interfaces.macaulay2 import macaulay2

Alternatively, you can use runfile (or %runfile) instead of run.