I am having trouble installing the nbgitpuller extension, for all users, which I suspect is due to my JupyterHub configuration. I would appreciate if someone could take a look and let me know where I am going wrong.
Jupyter labextension also reports nbgitpuller as not being installed…
$ sudo /opt/jupyterhub/bin/jupyter labextension list
JupyterLab v4.0.7
/opt/jupyterhub/share/jupyter/labextensions
jupyterlab_pygments v0.2.2 enabled X (python, jupyterlab_pygments)
jupyterlab_onedarkpro v0.1.0 enabled OK (python, jupyterlab_onedarkpro)
@jupyter-widgets/jupyterlab-manager v5.0.9 enabled OK (python, jupyterlab_widgets)
The following extensions are outdated:
jupyterlab_pygments
Consider checking if an update is available for these packages.
Doing a file search I can see the python pkg installed but that is it… /opt/conda/envs/python/lib/python3.8/site-packages/nbgitpuller
Am I wrong to assume that all pip installed extensions result in a folder in /opt/conda/envs/python/share/jupyter/labextensions/ ?
And if so how can I get Jupyter to recognise the extension in the site-packages folder?
nbgitpuller needs to be installed in the Python environment used for your singleuser server, i.e. wherever jupyterhub-singleuser is running from. By default this will be the same as your JupyterHub environment (/opt/jupyterhub/) but it doesn’t have to be, it’s common to use a separate user environment so packages can be managed independently.
The other thing to be aware of is that pip may automatically install to a local user’s folder instead of the system folder if the permissions aren’t correct. Most commonly this occurs if the system folder is owned by root but you’re running pip as a normal user.
If that’s not enough to get it working can you:
share your full JupyterHub configuration
tell us how you installed JupyterHub, and how it’s run
Thank you @manics.
Each user has their own conda environment that is used as the default kernel. With other extensions I was able to install them in JupyterHub in the user & python environment used by jupyterhub itself, but it sounds like nbgitpuller may have to be installed for each user in their own environment which is something I was trying to avoid.
JupyterHub was installed following this guide.
I skipped the Nginx reverse proxy steps, as we use a proxy external to the server.