About JupyterHub and JupyterLab dependencies

  • Why does JupyterLab image install/need jupyterhub package?

JupyterHub is a single Python package, providing two components:

  1. the JupyterHub server (usually called the Hub)
  2. the JupyterHub authentication extension (an Extension for jupyter-server for authenticating with the Hub)

It’s the second component that you need in the user environment.

These are tightly coupled, so developed and distributed as a single package. They could be two, but the only problem that would really solve is a wasted dependency on sqlalchemy, while complicating distribution substantially.

  • Why newer images of JupyterLab are not backward compatible with older versions of JupyterHub?

They usually are a pretty long way, but not forever. 1.5 is very far out of date - 3 years and 3 major versions behind. Hopefully the first bit explains why - the mechanism for authenticating with JupyterHub is provided by the JupyterHub package in the user environment. This should ideally match, but as long as the major version matches, it should work.

I believe the specific bug you hit is fixed in jupyterhub 4.1, which is in the lab-4.1.5 image.