Adding kernels in jupyter

2.6k Views Asked by At

I have python3 kernel and want to add python2 kernel to my Jupyter notebook.

Command I used to add python2:

jupyter kernelspec install C:\Python27\

I get:

[InstallKernelSpec] Installed kernelspec python27 in C:\ProgramData\jupyter\kernels\python27

But when I list kernels:

Available kernels:
  python3    c:\users\usrer1\appdata\local\programs\python\python36-32\share\jupyter\kernels\python3

Why isn't the python2 kernel adding to the list?

1

There are 1 best solutions below

2
On

You will find this message at the link below.

"This documentation covers IPython versions 6.0 and higher. Beginning with version 6.0, IPython stopped supporting compatibility with Python versions lower than 3.3 including all versions of Python 2.7. If you are looking for an IPython version compatible with Python 2.7, please use the IPython 5.x LTS release and refer to its documentation (LTS is the long term support release)."

https://ipython.readthedocs.io/en/latest/install/kernel_install.html

Here is a link to the 5.x docs...

http://ipython.readthedocs.io/en/5.x/install/kernel_install.html#kernel-install

Here is another resource that might help you. It also mentions that yes, the fragmentation with the docs is a bit of hassle.

https://github.com/jupyter/jupyter/issues/71

Many of the suggestions you'll find at the links here assume you are either using some version of pip or Anaconda. I too ran into a bit of trouble getting multiple kernels to work, however, Anaconda really makes things much simpler and easier to manage. They even offer a Python 2.7 version of this download.

Hope it works out; Jupyter Notebooks are a joy to use.