> email to jupyter+unsubscribe@googlegroups.com.
> To post to this group, send email to jup...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAP7f1AgO4HB%2Br-s%3DtF7kWUyHgi96rZvCC-dUMoapZZFQ0r3kuw%40mail.gmail.com.
> 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 jupyter+unsubscribe@googlegroups.com.
To post to this group, send email to jup...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CANJQusX74RaRwQ3FqnAkGjZ2Yz%2B%2B7Lj3QnX3dRjir%3DAcasG7sQ%40mail.gmail.com.
This is usually set if you want to start the single-user server in a different python environment (with virtualenv/conda) than JupyterHub itself.
from jupyterhub.spawner import LocalProcessSpawner
c.LocalProcessSpawner.options_form = \
"""
Choose an environment:
<select name="env" multiple="true">
<option value="default">Default</option>
<option value="alternate">Alternate</option>
</select>
"""
def activate_env(spawner):
env = spawner.user_options.get('env')[0]
if env == 'alternate':
spawner.cmd = [
'bash', '-c',
'source activate alternate && jupyterhub-singleuser'
]
c.LocalProcessSpawner.pre_spawn_hook = activate_env
import subprocess
c.LocalProcessSpawner.popen_kwargs = dict(stdout=subprocess.PIPE)
c.JupyterHub.spawner_class = LocalProcessSpawner
[C 2017-11-27 13:39:01.834 SingleUserNotebookApp application:90] Bad config encountered during initialization:[C 2017-11-27 13:39:01.834 SingleUserNotebookApp application:91] The 'ip' trait of a SingleUserNotebookApp instance must be a unicode string, but a value of None <class 'NoneType'> was specified.