jupyter: No such kernel named python3

I had the same issue. I use jupyter through Anaconda, as you do. It appears that PyCharm try to run an engine named by default "python3" but it is named "Python[Root]" in anaconda default installation.

After a few debugging, the issue seems to be:

  • In PyCharm which uses NATIVE_KERNEL_NAME by default in place of default conda kernel named "Python [Root]"
  • Or in conda CondaKernelSpecManager.find_kernel_specs methods which removes default native kernel names apparently with no good reason and anyway, in a bad way

For the short answer, I've worked around by editing manually

anaconda3/lib/python3.5/site-packages/nb_conda_kernels/manager.py

This is probably not the best option, but for the moment it works

def find_kernel_specs(self):
    """Returns a dict mapping kernel names to resource directories.

    The update process also add the resource dir for the conda
    environments.
    """

    kspecs = super(CondaKernelSpecManager, self).find_kernel_specs()

    # COMMENT THIS
    # remove native kernels because it is provided by the env name
    # if "python3" in kspecs:
    #     kspecs.pop("python3")
    # elif "python2" in kspecs:
    #     kspecs.pop("python2")
    # elif "R" in kspecs

https://github.com/ContinuumIO/anaconda-issues/issues/936


We've released versions of nb_conda, nb_conda_kernels and nb_anacondacloud through the official Anaconda conda repos that should resolve the issues you are seeing!

shell conda update nb_conda nb_conda_kernels nb_anacondacloud

As-installed kernel names that are eligible for being default (e.g. python2, python3, ir, etc.) will be maintained unmodified, so they should always appear there.

The downside is as many as three options for the current env, i.e. if you are in root, you will see Python 2 and Python [root] and Python [default], you can now reproducibly capture which environment your kernel should run against.

meta: https://github.com/Anaconda-Platform/anaconda-nb-extensions/issues/166