jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127

Md Sirajus Salayhin picture Md Sirajus Salayhin · May 18, 2017 · Viewed 38.1k times · Source

I have already installed Jupyter notebook in my ubuntu 16.04 machine. In jupyter notebook there is by default python installed. Now I want to use R from jupyter notebook.

To do so I followed IRkernel installation link and run below commands:

install.packages('devtools')

devtools::install_github('IRkernel/IRkernel')

But when I run IRkernel::installspec() command it shows below error:

jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127

I am now confused why this error occurs.

Answer

Md Sirajus Salayhin picture Md Sirajus Salayhin · May 22, 2017

Running this command from RStudio will show this error. When you run this command from command line/ terminal then everything will be fine.

So just type R from your command line.

Then Run below commands:

install.packages('devtools')

devtools::install_github('IRkernel/IRkernel')

enter image description here

IRkernel::installspec()