# Jupyterhub on Centos7: ruamel.yaml error (Jupyter Notebook works)

**URL:** <https://discourse.jupyter.org/t/jupyterhub-on-centos7-ruamel-yaml-error-jupyter-notebook-works/4666>\
**Category:** JupyterHub\
**Created:** [June 2, 2020, 11:31pm UTC](https://discourse.jupyter.org/t/jupyterhub-on-centos7-ruamel-yaml-error-jupyter-notebook-works/4666 "2020-06-02T23:31:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![opoloko](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@opoloko](https://discourse.jupyter.org/u/opoloko)\
**Post date:** [June 2, 2020, 11:31pm UTC](https://discourse.jupyter.org/t/jupyterhub-on-centos7-ruamel-yaml-error-jupyter-notebook-works/4666/1 "2020-06-02T23:31:51Z")

</div>

Hi all

After installing JupyterHub via python3 pip, I get this error:

(base) root@host [~/.jupyter]# jupyterhub -hTraceback (most recent call last): File “/usr/local/bin/jupyterhub”, line 5, in  
from jupyterhub.app import main  
File “/usr/local/lib/python3.6/site-packages/jupyterhub/app.py”, line 64, in  
from jupyter\_telemetry.eventlog import EventLog  
File “/usr/local/lib/python3.6/site-packages/jupyter\_telemetry/init.py”, line 6, in  
from .eventlog import EventLog # noqa  
File “/usr/local/lib/python3.6/site-packages/jupyter\_telemetry/eventlog.py”, line 10, in  
from ruamel.yaml import YAML  
ImportError: cannot import name ‘YAML’

I do have ruamel.yaml installed in /usr/lib64/python3.6/site-packages (version 0.13.14), and this Centos7 system works perfectly with a Notebook server.

Why is Jupyterhub not working and/or not seeing/searching installed modules properly?

---

<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:** [June 3, 2020, 7:33pm UTC](https://discourse.jupyter.org/t/jupyterhub-on-centos7-ruamel-yaml-error-jupyter-notebook-works/4666/2 "2020-06-03T19:33:46Z")

</div>

You’ve mentioned two different Python environments, one under `/usr/local` and one under `/usr/lib64`. There’s no guarantee that packages from these two environments can be combined. To avoid these types of problems you can create an independent virtualenv instead and install everything in that.

---

<div class="post-metadata">

**Author:** ![opoloko](https://avatars.discourse-cdn.com/v4/letter/o/49beb7/32.png) [@opoloko](https://discourse.jupyter.org/u/opoloko)\
**Post date:** [June 3, 2020, 7:54pm UTC](https://discourse.jupyter.org/t/jupyterhub-on-centos7-ruamel-yaml-error-jupyter-notebook-works/4666/3 "2020-06-03T19:54:31Z")

</div>

Hi, thanks for your feedback, I thought the same but actually that system works perfectly with everything else. Looking into another forum for another software, I came to the fact that the problem lies into ruamel.yaml package, that gives problems quite often apparently.

The solution posted was to install instead a patched version of the same package, called ruamel\_yaml, always via pip, and that solved the problem.
