Open disimone opened 7 years ago
One scpecial thing is that I am using virtual environments. The extensions, as well as the configurator, are installed in a virtualenv. The jupyter server knows about it, though. Indeed, as I said the extensions work smoothly. It is just the configurator I am having problems with.
The extensions (for the most part) only rely on javascript, so they're not necessarily a good gauge for whether your virtualenv is set up correctly. To recap, the general model running here is
jupyter notebook
with a specific base url something like 'user/username`. This happens in some python (possibly virtual) environment, which can be different from the hub env in step 1. This is the env into which you need to install the configuratorSo essentially, I think the issue probably depends on how exactly you're arranging your envs - whether you have the same virtualenv active for the single-user server as well as any kernels. How exactly did you go about setting this up? Did you set up the hub, or is that done by someone already?
To clarify, my guess is that what may have happened is:
Also note that you'll need to restart the single-user notebook server in order for any newly-installed serverextensions (such as the configurator) to get loaded.
Hope that makes sense?
Hi,
thanks for your clarifications. This makes a lot more sense now. I suspect the problem may lay in the single-user server not living in any virtualenv. I'll look into this and post my solution, assuming I find one :)
Andrea.
:+1: glad it makes sense :)
I suspect the problem may lay in the single-user server not living in any virtualenv.
I think that's likely. If you want your single-user server to start in the virtualenv (and you have access to configure & restart the hub), you might want to check the Spawner.cmd
and LocalProcessSpawner.shell_cmd
configurables (see jupyterhub/spawner.py#L317-L331 and jupyterhub/spawner.py#L867-L877 for details). It's not trivially easy to activate virtualenvs in subprocess though, so it may be easier to just want to install the configurator into the non-virtualenv, which should also work. To do the latter, you should be able to open a terminal from the single-user server (assuming it lives on a UNIX machine like the hub), possibly deactivate the virtualenv (see e.g. this SO answer for how to deactivate), then just install as you did with the venv active. ALternatively, specify the full path to the pip executable you wish to use for the install, to get it into the non-virtualenv...
Dear all,
first of all, thanks for providing this code.
I am trying to use the configurator on a jupyterhub. I installed the contrib_extensions as a user, and enabled them. The extensions run smoothly on the notebook served by the hub-spawned server.
The only problem is that I don't see the configurator entry anywhere in the notebook menu. Nor can I access it from hostname:port/base/url/nbextensions.
Is there something special I need to do? Up to now I just followed the instructions:
One scpecial thing is that I am using virtual environments. The extensions, as well as the configurator, are installed in a virtualenv. The jupyter server knows about it, though. Indeed, as I said the extensions work smoothly. It is just the configurator I am having problems with.
Thanks for your help,
Andrea.