, ,

Being live documents, notebooks enable reproducible research and Jupyter is one of the frontiers. Assume, we want to use both recent and legacy version of Python as kernels and we have Python, Python3 and Jupyter already installed. Initial instance of Jupyter notebook will provide only (probably the latest) kernel, as can be seen below.

jupyter kernelspace - initial kernelspace

jupyter kernelspace - initial notebook

In order to see both Python2 and Python3 kernels, we should install and then introduce the desired kernel using

python2 -m pip install --upgrade ipykernel
python2 -m ipykernel install

In the figure below, it is seen that we have Python2 kernel is already installed but yet to be introduced. If somehow we have seen Python listed and Python3 missing, we should then need to replace 2 with 3 at the corresponding commands.

jupyter kernelspace - installing python2 ipykernel

Result will be listing in kernelspace and choice option at web interface as follows;

jupyter kernelspace - final kernelspace

jupyter kernelspace - final notebook