Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage Python CGI - Error: environment variable $HOME is not set.

Hello,

I am trying to access sage libraries from within a python script (CGI on Apache). I'm getting this error every time:

Error: environment variable $HOME is not set. Error setting environment variables by sourcing '/opt/sage-5.7/spkg/bin/sage-env'; possibly contact sage-devel (see http://groups.google.com/group/sage-devel).

This is the line that produces the error: #!/opt/sage-5.7/sage --python

The error doesn't occur when I run the script from the command line. It may be an issue with the user that the script is being run under, but I am not sure how to resolve it. Any suggestions?