Create docker image of Base-Notebook with python 2.7

Hi,
I want to create a new image using base-notebook docker-stacks with python 2.7. I tried doing that but I am facing this error.

Step 27/36 : RUN conda install --quiet --yes ‘notebook=6.1.3’ ‘jupyterhub=1.1.0’ ‘jupyterlab=2.2.5’ && conda clean --all -f -y && npm cache clean --force && jupyter notebook --generate-config && rm -rf $CONDA_DIR/share/jupyter/lab/staging && rm -rf /home/$NB_USER/.cache/yarn && fix-permissions $CONDA_DIR && fix-permissions /home/$NB_USER
—> Running in 3082eb1336bf
Collecting package metadata (current_repodata.json): …working… done
Solving environment: …working… failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): …working… /bin/bash: line 1: 6 Killed conda install --quiet --yes ‘notebook=6.1.3’ ‘jupyterhub=1.1.0’ ‘jupyterlab=2.2.5’
The command ‘/bin/bash -o pipefail -c conda install --quiet --yes ‘notebook=6.1.3’ ‘jupyterhub=1.1.0’ ‘jupyterlab=2.2.5’ && conda clean --all -f -y && npm cache clean --force && jupyter notebook --generate-config && rm -rf $CONDA_DIR/share/jupyter/lab/staging && rm -rf /home/$NB_USER/.cache/yarn && fix-permissions $CONDA_DIR && fix-permissions /home/$NB_USER’ returned a non-zero code: 137

I think this is happening because of unsupported versions of notebook or jupyterhub.
So can anyone please help me with correct versions or can tell me if anything else needs to be done.

You are correct that Jupyter notebook 6.x does not run using Python 2. ref.

You may wish to review this community contributed recipe for Python 2

1 Like