First time here? Check out the FAQ!
answered 3 years ago
If you use run, then the .sage file is understood as an independent Python script, hence you should import the required modules, e.g.
run
.sage
from sage.interfaces.macaulay2 import macaulay2
Alternatively, you can use runfile (or %runfile) instead of run.
runfile
%runfile