Hi,
I set up the vanilla Jupyterhub (0.8.1 on an Ubuntu 16.04 LTS server) with a basically unmodified configuration, except for SSL certs. The bash.bashrc (I also tried /etc/profile) file in /etc/ contains some additional export entries for PATH and PYTHONPATH, but they are never avaiblable in the notebooks unless I set them myself using
import sys
sys.path.append('/opt/my/speciallibrary')
which as you can imagine is kind of impractical. However, the variables are available in the normal Python REPL as well as in the terminal in Jupyter.
The generated default configuration suggests that those variables are passed through the filter, therefore his shouldn't pose a problem.
which -a suggests all libraries are installed globally and otherwise everything works as it should. I'm running the hub with sudo as this is the suggested method to get multiple users with the default settings. It's a demo server for a notebook plugin prototype and all users can be trusted to not break stuff on purpose.
jupyter troubleshoot displays the correct $PATH and sys.path values, so the variables are in Jupyter but somehow omitted or reset by the kernels?
MinRK figured it could have something to do with the spawners not using login shells so he suggested to run one previous to starting the kernel by setting the configuration
c.LocalProcessSpawner.shell_cmd = ['bash', '-l', '-c']
but unfortunately that doesn't seem to have any effect, either.
Does anyone have an idea what else could have gone wrong or is missing?
I'm comming straight from
https://github.com/jupyterhub/jupyterhub/issues/1695 and am hoping to find more input here, because it's still unclear to me if this even is a bug; which it probably isn't.
Best regards.