I'm still not sure why it needs DISPLAY at all; the IPython kernel should run in a headless environment. But I'm glad you worked it out.
On 23 August 2016 at 00:24, Sachin Mehta <[email protected]> wrote: > We found the issue. > > When we are running Jupyter notebook, DISPLAY variable was set, but when > we running JupyterHub DISPLAY variable was empty and thus we were getting > this error. > > We checked the Display variable as: > > import os > print os.environ['DISPLAY'] > > Many thanks for your responses and help. Really appreciate that. > > On Monday, August 22, 2016 at 2:34:56 PM UTC-7, Sachin Mehta wrote: >> >> I checked the IPython configuration and I am not setting anything in >> IPython's configuration. I believe Jupyter and JupyterHub uses Ipython >> configuration file. I am able to run Jupyter notebook without any trouble >> but getting these errors with JupyterHub. >> >> I checked the $PYTHONSTARTUP variable and it is empty. >> >> On Monday, August 22, 2016 at 11:46:38 AM UTC-7, takowl wrote: >>> >>> On 22 August 2016 at 19:08, Sachin Mehta <[email protected]> wrote: >>> >>>> I do agree that matplotlib or pylab might be causing this issue. >>>> However, in jupyter notebook, we can control the invoking of these >>>> libraries using "c.NotebookApp.pylab = 'disabled' " command in >>>> jupyter_notebook_config.py file. Such an option doesn't exist in >>>> jupyterhub_config.py file. How can we disable pylab or matplotlib at the >>>> initialization of jupyterhub? >>>> >>> >>> It would be part of IPython's configuration, not Jupyter's (as it's >>> specific to Python kernels), so it would be in ~/.ipython/profile_default/ >>> . But IPython doesn't enable it by default, so unless you've set something >>> in config already, that shouldn't be the issue. Is it possible that you >>> have $PYTHONSTARTUP set? >>> >> -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jupyter/882de6d4-c127-43cb-9da4-7a5e1d27329c%40googlegroups.com > <https://groups.google.com/d/msgid/jupyter/882de6d4-c127-43cb-9da4-7a5e1d27329c%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Project Jupyter" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAOvn4qin0bnCzkZ%2B8TZtN_t65uwJrQ%3DNJqq_qbq%2Bz-2eqTMqgQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
