jupyterhub / jupyterhub-example-kerberos

Example for experimenting with how JupyterHub can be configured to work with Kerberos
Other
33 stars 22 forks source link

ImportError: No module named 'jinja2 #9

Open mshahacr opened 6 years ago

mshahacr commented 6 years ago

Starting jupyterhubexamplekerberosmaster_kdc_1 ... done Starting jupyterhubexamplekerberosmaster_hubsudo_1 ... Starting jupyterhubexamplekerberosmaster_hub_1 ... done Attaching to jupyterhubexamplekerberosmaster_kdc_1, jupyterhubexamplekerberosmaster_hubsudo_1, jupyterhubexamplekerberosmaster_hub_1 kdc_1 | Starting Kerberos KDC krb5kdc kdc_1 | ...done. kdc_1 | Starting Kerberos administrative servers kadmind kdc_1 | ...done. kdc_1 | Sep 25 19:53:20 f2360325fc6e krb5kdc12: commencing operation kdc_1 | Sep 25 19:54:49 f2360325fc6e krb5kdc11: setting up network... kdc_1 | Sep 25 19:54:49 f2360325fc6e krb5kdc11: listening on fd 9: udp 0.0.0.0.88 (pktinfo) kdc_1 | Sep 25 19:54:49 f2360325fc6e krb5kdc11: listening on fd 10: udp 0.0.0.0.750 (pktinfo) kdc_1 | krb5kdc: setsockopt(11,IPV6_V6ONLY,1) worked kdc_1 | krb5kdc: Invalid argument - Cannot request packet info for udp socket address :: port 88 kdc_1 | Sep 25 19:54:49 f2360325fc6e krb5kdc11: skipping unrecognized local address family 17 kdc_1 | Sep 25 19:54:49 f2360325fc6e krb5kdc11: skipping unrecognized local address family 17 kdc_1 | Sep 25 19:54:49 f2360325fc6e krb5kdc11: set up 2 sockets kdc_1 | Sep 25 19:54:49 f2360325fc6e krb5kdc12: commencing operation hubsudo_1 | Traceback (most recent call last): hubsudo_1 | File "/opt/conda/bin/jupyterhub", line 3, in hubsudo_1 | from jupyterhub.app import main hubsudo_1 | File "/opt/conda/lib/python3.5/site-packages/jupyterhub/app.py", line 24, in hubsudo_1 | from jinja2 import Environment, FileSystemLoader hubsudo_1 | ImportError: No module named 'jinja2' hub_1 | Traceback (most recent call last): hub_1 | File "/opt/conda/bin/jupyterhub", line 3, in hub_1 | from jupyterhub.app import main hub_1 | File "/opt/conda/lib/python3.5/site-packages/jupyterhub/app.py", line 24, in hub_1 | from jinja2 import Environment, FileSystemLoader hub_1 | ImportError: No module named 'jinja2' jupyterhubexamplekerberosmaster_hubsudo_1 exited with code 1 jupyterhubexamplekerberosmaster_hub_1 exited with code 1

dvalters commented 5 years ago

@meesam15 Did you find a resolution to your issue?

dvalters commented 5 years ago

Update: My workaround was to upgrade some of the packages in the Dockerfile(s):

diff --git a/Dockerfile.hub b/Dockerfile.hub
index 08f2cc3..82a3b27 100644
--- a/Dockerfile.hub
+++ b/Dockerfile.hub
@@ -1,4 +1,4 @@
-FROM ubuntu:14.04
+FROM ubuntu:18.04

 # Create local user accounts
 RUN adduser alice --gecos --disabled-password && \
@@ -11,21 +11,23 @@ RUN apt-get update && \
         krb5-user \
         wget \
         bzip2 \
+        gcc-6 \
         ca-certificates

 # Install miniconda to get jupyterhub
-RUN wget -q https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh -O /tmp/miniconda.sh  && \
-    echo 'd0c7c71cc5659e54ab51f2005a8d96f3 */tmp/miniconda.sh' | md5sum -c - && \
+RUN wget -q https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O /tmp/miniconda.sh  && \
+    echo '718259965f234088d785cad1fbd7de03 */tmp/miniconda.sh' | md5sum -c - && \
     bash /tmp/miniconda.sh -f -b -p /opt/conda && \
     rm /tmp/miniconda.sh

 RUN /opt/conda/bin/conda install --yes -c conda-forge \
-    python=3.5 \
-    notebook=5.0.0 \
-    idna=2.5 \
-    jupyterhub=0.7.2 \
-    'pamela>=0.3' \
-    sudospawner=0.4.1 && \
+    python=3.7 \
+    notebook=* \
+    idna=* \
+    jupyterhub=* \
+    jinja2=* \
+    pamela=* \
+    sudospawner=* && \
     /opt/conda/bin/conda clean -tipsy