ModuleNotFoundError: No module named 'jupyterhub'

Hi,

I just ran a do-release-upgrade un Unbuntu.
After that jupyterhub does not start anymore…

the log shows:

Feb 28 07:24:06 unbuntuserver systemd[1]: Started jupyterhub.service - JupyterHub.
Feb 28 07:24:07 unbuntuserver jupyterhub[961]: Traceback (most recent call last):
Feb 28 07:24:07 unbuntuserver jupyterhub[961]: File “/opt/jupyterhub/bin/jupyterhub”, line 5, in
Feb 28 07:24:07 unbuntuserver jupyterhub[961]: from jupyterhub.app import main
Feb 28 07:24:07 unbuntuserver jupyterhub[961]: ModuleNotFoundError: No module named ‘jupyterhub’
Feb 28 07:24:07 unbuntuserver systemd[1]: jupyterhub.service: Main process exited, code=exited, status=1/FAILURE
Feb 28 07:24:07 unbuntuserver systemd[1]: jupyterhub.service: Failed with result ‘exit-code’.

Please help!
How can I anyalyse this further?
Maybe there are known causes or even solutions?

Thanx a lot!

Marc

on a terminal on that machine, when I

source /opt/jupyterhub/bin/activate

I even get…

Traceback (most recent call last):
File “/opt/jupyterhub/bin/pip”, line 5, in
from pip._internal.cli.main import main
ModuleNotFoundError: No module named ‘pip’

Did you upgrade your Python version? It might be easiest to create a new virtualenv and reinstall all your requirements.

sorry for the delay, I was away :slight_smile:

No, I myself did not change anything. Only the upgrade did…

Unfortunately this got me very confused! I did not really get the internal workings. Do I have to create a virtualenv with the same name and this is used automatically?

thank you for your reply!

Marc

If you recreate an environment at the same path, it will be used automatically, yes.

It may work best to run the tljh bootstrap again to recreate the jupyterhub environment.