P Purkayastha wrote:
On 01/28/2014 09:41 PM, Jeremy McFarland wrote:
Hello,
I am very impressed with sage, and would love to use it on my Ubuntu
server. I attempted to install sagecell, but that was a huge mess and
I gave up. I do not want to make calls to another system outside my
network, so I need sage (or sagecell) to run locally.
I am running Ubuntu 12.04 Server with the latest version of Sage
binary installed. When I attempt to execute a sage -python call I
receive the following error in my Apache2 error.log:
Error: environment variable $HOME is not set.
Error setting environment variables by sourcing
'/usr/lib/sagemath/spkg/bin/sage-env'
Setting $HOME in the python script does not fix this. /var/www/.sage
exists in the www-data home directory of /var/www. www-data owns and
has r/w on /var/www/.sage.
Is there a fix for this? If not, is there a successful install
instruction set for installing sagecell on Ubuntu with the latest
release of Sage? Any other alternatives for execution of python code
using the Sage libraries so I can execute things in sage and return
them to my PHP script being run on the webserver?
You can try to set $HOME in SAGE_ROOT/local/bin/sage-env, like
export HOME="some directory"
This file is not a python script, but is a bash script.
The problem you are facing is that Sage expects $HOME to be defined and
the directory actually present. It uses $HOME/.sage by default where it
stores all configuration.
Well, but we should probably just require HOME to be set *unless*
DOT_SAGE is already set.
(Using Sage shouldn't need $HOME, while building Sage might still, e.g.
ECL by default wanted to look into $HOME when building Maxima, because
we [used to] run it without '--norc'...)
-leif
--
() The ASCII Ribbon Campaign
/\ Help Cure HTML E-Mail
--
You received this message because you are subscribed to the Google Groups
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.