# ModuleNotFoundError: No module named 'jupyterhub'

**URL:** <https://discourse.jupyter.org/t/modulenotfounderror-no-module-named-jupyterhub/33322>\
**Category:** JupyterHub\
**Created:** [February 28, 2025, 7:07am UTC](https://discourse.jupyter.org/t/modulenotfounderror-no-module-named-jupyterhub/33322 "2025-02-28T07:07:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MarcRohrer](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@MarcRohrer](https://discourse.jupyter.org/u/MarcRohrer)\
**Post date:** [February 28, 2025, 7:07am UTC](https://discourse.jupyter.org/t/modulenotfounderror-no-module-named-jupyterhub/33322/1 "2025-02-28T07:07:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MarcRohrer](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@MarcRohrer](https://discourse.jupyter.org/u/MarcRohrer)\
**Post date:** [February 28, 2025, 7:46am UTC](https://discourse.jupyter.org/t/modulenotfounderror-no-module-named-jupyterhub/33322/2 "2025-02-28T07:46:34Z")

</div>

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’

---

<div class="post-metadata">

**Author:** ![manics](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/manics/32/85_2.png) [@manics](https://discourse.jupyter.org/u/manics)\
**Post date:** [February 28, 2025, 12:42pm UTC](https://discourse.jupyter.org/t/modulenotfounderror-no-module-named-jupyterhub/33322/3 "2025-02-28T12:42:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MarcRohrer](https://avatars.discourse-cdn.com/v4/letter/m/8edcca/32.png) [@MarcRohrer](https://discourse.jupyter.org/u/MarcRohrer)\
**Post date:** [March 4, 2025, 6:11am UTC](https://discourse.jupyter.org/t/modulenotfounderror-no-module-named-jupyterhub/33322/4 "2025-03-04T06:11:44Z")

</div>

sorry for the delay, I was away 🙂

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

---

<div class="post-metadata">

**Author:** ![minrk](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/minrk/32/13_2.png) [@minrk](https://discourse.jupyter.org/u/minrk)\
**Post date:** [March 4, 2025, 9:28am UTC](https://discourse.jupyter.org/t/modulenotfounderror-no-module-named-jupyterhub/33322/5 "2025-03-04T09:28:56Z")

</div>

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.
