[sage-devel] Jupyterhub kernel and SAGE_ROOT

2018-11-04 Thread Jori Mäntysalo
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


Re: [sage-devel] Jupyterhub kernel and SAGE_ROOT

2018-11-04 Thread François Bissey
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  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.


Re: [sage-devel] Jupyterhub kernel and SAGE_ROOT

2018-11-04 Thread Jori Mäntysalo

On Mon, 5 Nov 2018, François Bissey wrote:


Didn’t we have that conversation a couple of months ago?
The message here comes from this section of code in sage-env



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


OK, so I just hardcoded this by commenting out return 1 and putting

NEW_SAGE_ROOT=/home/jupkernelit/sage-8.4

instead. Now it at works, including graphich. Sorry for the noise.

Now it's time for polyamory, i.e. getting also shibboleth ready. But that 
will be off-topic for this list.


--
Jori Mäntysalo

Re: [sage-devel] Jupyterhub kernel and SAGE_ROOT

2018-11-04 Thread Dima Pasechnik
On Mon, Nov 5, 2018 at 7:42 AM Jori Mäntysalo  wrote:
>
> On Mon, 5 Nov 2018, François Bissey wrote:
>
> > Didn’t we have that conversation a couple of months ago?
> > The message here comes from this section of code in sage-env
>
> > 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
>
> OK, so I just hardcoded this by commenting out return 1 and putting
>
> NEW_SAGE_ROOT=/home/jupkernelit/sage-8.4
>
> instead. Now it at works, including graphich. Sorry for the noise.
>
> Now it's time for polyamory, i.e. getting also shibboleth ready. But that
> will be off-topic for this list.

there are jupyter discussion boards on https://discourse.jupyter.org/,
by the way.
>
> --
> 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.


Re: [sage-devel] Jupyterhub kernel and SAGE_ROOT

2018-11-04 Thread François Bissey
I’d be curious about that, but yes that may be off-list.

François

> On 5/11/2018, at 20:42, Jori Mäntysalo  wrote:
> 
> Now it's time for polyamory, i.e. getting also shibboleth ready. But that 
> will be off-topic for this list.

-- 
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.