Didn’t we have that conversation a couple of months ago? The message here comes from this section of code in sage-env
# New value for SAGE_ROOT: either SAGE_ROOT (if given) # or a guessed value based on pwd. if [ -n "$SAGE_ROOT" ]; then NEW_SAGE_ROOT="$SAGE_ROOT" elif [ -f sage -a -d build ]; then NEW_SAGE_ROOT="." elif [ -f ../../sage -a -d ../../build ]; then NEW_SAGE_ROOT="../.." else # No idea what SAGE_ROOT should be... echo >&2 "Error: You must set the SAGE_ROOT environment variable or run this" echo >&2 "script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory." return 1 fi There is some more code in there to make you trip. Touching sage-env could solve your problem. Another interesting file you could try to seed with the value of SAGE_ROOT is /etc/environment François > On 5/11/2018, at 20:11, Jori Mäntysalo <jori.mantys...@uta.fi> wrote: > > I am trying to marry SageMath and Jupyterhub. I think I got them engaged, but > the wedding night has a problem: > > Error: You must set the SAGE_ROOT environment variable or run this > script from the SAGE_ROOT or SAGE_ROOT/local/bin/ directory. > Error setting environment variables by sourcing > '/home/jupkernelit/sage-8.4/local/bin/sage-env'; > possibly contact sage-devel (see http://groups.google.com/group/sage-devel) > > First I think that I just set SAGE_ROOT in the command line before > jupytehub-command, set it with export-command, or put it to /etc/profile. > They all failed, so jupyterhub seems to ignore environment. > > What next? > > -- > Jori Mäntysalo -- 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 https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.