Ask Your Question

Revision history [back]

A solution is run Sage's Python (instead of your system's Python):

sage -python

Equivalently, you can run Python from Sage shell:

sage -sh
python

Then all Sage's environment variables are automatically set and from sage.all import var does not give any error.