nskalis
nskalis

Reputation: 2382

jupyter: no kernel available

Could someone please advise on why I am not getting the option to choose python3 as a kernel ?

# python3 -m ipykernel install --user
Installed kernelspec python3 in /root/.local/share/jupyter/kernels/python3

# python3 -m pip install ipykernel
Requirement already satisfied: ipykernel in /usr/lib/python3.4/site-packages
Requirement already satisfied: tornado>=4.0 in /usr/lib64/python3.4/site-packages (from ipykernel)
Requirement already satisfied: ipython>=4.0.0 in /usr/lib/python3.4/site-packages (from ipykernel)
Requirement already satisfied: jupyter-client in /usr/lib/python3.4/site-packages (from ipykernel)
Requirement already satisfied: traitlets>=4.1.0 in /usr/lib/python3.4/site-packages (from ipykernel)
Requirement already satisfied: backports_abc>=0.4 in /usr/lib/python3.4/site-packages (from tornado>=4.0->ipykernel)
Requirement already satisfied: pexpect; sys_platform != "win32" in /usr/lib/python3.4/site-packages (from ipython>=4.0.0->ipykernel)
Requirement already satisfied: pickleshare in /usr/lib/python3.4/site-packages (from ipython>=4.0.0->ipykernel)
Requirement already satisfied: decorator in /usr/lib/python3.4/site-packages (from ipython>=4.0.0->ipykernel)
Requirement already satisfied: pygments in /usr/lib64/python3.4/site-packages (from ipython>=4.0.0->ipykernel)
Requirement already satisfied: setuptools>=18.5 in /usr/lib/python3.4/site-packages (from ipython>=4.0.0->ipykernel)
Requirement already satisfied: simplegeneric>0.8 in /usr/lib/python3.4/site-packages (from ipython>=4.0.0->ipykernel)
Requirement already satisfied: prompt-toolkit<2.0.0,>=1.0.3 in /usr/lib/python3.4/site-packages (from ipython>=4.0.0->ipykernel)
Requirement already satisfied: jupyter-core in /usr/lib/python3.4/site-packages (from jupyter-client->ipykernel)
Requirement already satisfied: pyzmq>=13 in /usr/lib64/python3.4/site-packages (from jupyter-client->ipykernel)
Requirement already satisfied: ipython-genutils in /usr/lib/python3.4/site-packages (from traitlets>=4.1.0->ipykernel)
Requirement already satisfied: six in /usr/lib/python3.4/site-packages (from traitlets>=4.1.0->ipykernel)
Requirement already satisfied: ptyprocess>=0.5 in /usr/lib/python3.4/site-packages (from pexpect; sys_platform != "win32"->ipython>=4.0.0->ipykernel)
Requirement already satisfied: wcwidth in /usr/lib/python3.4/site-packages (from prompt-toolkit<2.0.0,>=1.0.3->ipython>=4.0.0->ipykernel)

From the command-line I can see indeed that the python3 kernel is installed

# jupyter kernelspec list
[ListKernelSpecs] WARNING | Native kernel (python2) is not available
[ListKernelSpecs] WARNING | Native kernel (python2) is not available
Available kernels:
  python3    /root/.local/share/jupyter/kernels/python3

But jupyter does not to be able to understand it: enter image description here Could someone please advise on how to resolved this issue?

Upvotes: 6

Views: 33233

Answers (5)

IRKillRoy
IRKillRoy

Reputation: 11

I installed my kernel using this:

python -m IPython kernel install

For more subcommands:

    Manage Jupyter kernel specifications.
    
    Subcommands
    ===========
    Subcommands are launched as `jupyter kernelspec cmd [args]`. For information on
    using subcommand 'cmd', do: `jupyter kernelspec cmd -h`.

    - list
        List installed kernel specifications.

    - install
        Install a kernel specification directory.

    - uninstall
        Alias for remove.

    - remove
        Remove one or more Jupyter kernelspecs by name.

    - install-self
        [DEPRECATED] Install the IPython kernel spec directory for this Python.

    - provisioners
        List available provisioners for use in kernel specifications.

Upvotes: 0

Andr&#233;s Bustamante
Andr&#233;s Bustamante

Reputation: 462

jupyter kernelspec install-self

is DEPRECATED as of 4.0.

Now you have to use

IPython kernel install

Upvotes: 2

sammy ongaya
sammy ongaya

Reputation: 1401

To resolve this problem I installed the ipython kernel and everything worked.

pip install ipython

Upvotes: 0

Jayasurya
Jayasurya

Reputation: 137

python3 -m jupyter kernelspec install-self

Go to the jupyter folder which is inside Appdata/Roaming/Jupyter Then inside the folder, you will find a kernels folder inside that there will be many kernels like python3 etc

The path should be like this,

C:\Users\Jayasurya\AppData\Roaming\jupyter\kernels\python3

Inside this find a kernel.json file and make sure your Python executable is in the file

{
 "argv": [
  "c:\\python\\python.exe",
  "-m",
  "ipykernel_launcher",
  "-f",
  "{connection_file}"
 ],
 "display_name": "Python 3",
 "language": "python"
}

The path should be inside the args list, in my code above it's in the 3rd line "c:\\python\\python.exe" make sure that the executable path is right

Upvotes: 1

Yasin Yousif
Yasin Yousif

Reputation: 967

try:

python3 -m IPython kernelspec install-self or

python3 -m jupyter kernelspec install-self

to reinstall the kernelspec , I am refering to this issue

Upvotes: 6

Related Questions