Running JuptyerLab with JupyterHub (TLJH on own server)

Hello everbody,
I installed JupyterHub on a virtual machine running Kubuntu 20.04 LTS for testing purposes.
The installationprocess ( Installing on your own server — The Littlest JupyterHub v0.1 documentation ) worked greatfully.

After that I intended to install JuptyerLab. I handled this like a package install by executing:
sudo -E conda install -c conda-forge jupyterlab
in the JupyterHub terminal.

That worked without any error messages.

Finally I restartet the complete virtual machine but I do not know how to start / create a new notebook using JupyterLab after login in via browser.

Did I do something wrong on the installation process?

Hi,
you don’t need to install Jupyterlab when using The Littlest JupyterHub as it is available by default as an alternate interface. You can temporarily switch the interface or make it the default interface. You can find all the information here: Change default User Interface for users — The Littlest JupyterHub v0.1 documentation.
Guillaume

4 Likes

Thank you! :slight_smile:

Is there a possibility to let each user decide which one (s)he likes to use on default?

Merry Christmas!

I tried running

sudo tljh-config set user_environment.default_app jupyterlab

and even

sudo -E tljh-config set user_environment.default_app jupyterlab

but I got this feedback - also after a complete new installation on a fresh vm:

Traceback (most recent call last):
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 583, in _build_master
ws.require(requires)
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 900, in require
needed = self.resolve(parse_requirements(requirements))
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (chardet 4.0.0 (/opt/tljh/hub/lib/python3.8/site-packages), Requirement.parse(‘chardet<4.0,>=2.0’), {‘aiohttp’})

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/bin/tljh-config”, line 6, in
from pkg_resources import load_entry_point
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 3252, in
def _initialize_master_working_set():
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 3235, in _call_aside
f(*args, **kwargs)
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 3264, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 585, in _build_master
return cls._build_from_requirements(requires)
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 598, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File “/opt/tljh/hub/lib/python3.8/site-packages/pkg_resources/init.py”, line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (chardet 4.0.0 (/opt/tljh/hub/lib/python3.8/site-packages), Requirement.parse(‘chardet<4.0,>=2.0’), {‘aiohttp’})

I found no hints in the logs what went wrong.

@weikima It looks like you’ve hit this bug:

Thank you! So am I correct, that there is no solution by now?
We need to wait for an update of Python in TLJH to version 3.8?

Pin chardet by GeorgianaElena · Pull Request #643 · jupyterhub/the-littlest-jupyterhub · GitHub has been merged, so updating your TLJH installation might fix things? If not there’s a suggested fix in the description of tljh-config ContextualVersionConflict - chardet 4 vs jupyterhub-traefik-proxy · Issue #642 · jupyterhub/the-littlest-jupyterhub · GitHub

​. /opt/tljh/hub/bin/activate
pip uninstall chardet
pip install chardet==3.0.4

charlet already was v3.0.4 but running the TLJH-Script again for updating purposes worked - thx! :slight_smile:

1 Like