jupyterhub / jupyterhub-deploy-teaching

Reference deployment of JupyterHub and nbgrader on a single server

Home Page:http://jupyterhub-deploy-teaching.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python 2 On JupyterHub-Teaching

eamadord opened this issue · comments

Good morning,

I am trying to deploy a JupyterHub teaching server and I have not found any problems so far. However, as I have seen, I can only use Python 3 kernels, and I was wondering if there is a way to install Python 2 so it can be used to.

Regards.

Yes, you can install Python 2. It's not part of this deployment, but on the system after deploying, you can create an env with Python 2 and register that as a kernel:

# create a conda env called 'py2' with Python 2 and IPython
/opt/conda/bin/conda create -yq -n py2 python=2 ipykernel

# make this env available globally as a kernel
/opt/conda/envs/py2/bin/ipython kernel install --prefix=/opt/conda

You can install any additional packages you want to be available in the Python 2 env:

conda install -n py2 numpy scipy matplotlib

etc.