How to specify an older Jupyterhub version when installing TLJH?

In Dec 2023, I installed TLJH on a virtual machine (Ubuntu 22.04) and then installed nbgrader on the TLJH, and they worked perfectly with each other.

Now, in August 2024, I created an identical Ubuntu 22.04 virtual machine, but I found that the nbgrader had some issues. After excluding other possible reasons, I find the issue is that the Jupyterhub version installed in TLJH is now
different.

The Jupyterhub installed by TLJH installer in Dec 2023 was v4.0.2.
The Jupyterhub installed by TLJH installer in Aug 2024 is v4.1.6.

Is there a way to control the version of Jupyterhub installed by TLJH installer?

I noticed that I can customize the installer by option --version (The Littlest Jupyterhub). However, that controls the TLJH version, which is 1.0.0 for both my new and old installations. That option does not control the Jupyterhub version.

I don’t think you can currently add a constraint during installation, but you can downgrade after bootstrap in the hub environment:

sudo /opt/tljh/hub/bin/python3 -m pip install jupyterhub==4.0.*