Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 802
Md Sirajus Salayhin Avatar asked May 18 '17 19:05

Md Sirajus Salayhin


People also ask

What is Jupyter client?

Jupyter clients (also commonly called frontends) are programs which communicate with Jupyter kernels, possibly starting them and then sending them requests over the ZeroMQ-based messaging protocol. Examples of Jupyter clients include the Jupyter console, the QtConsole, and the http://jupyter.org/.

Why is Jupyter lab not working?

Jupyter doesn't load or doesn't work in the browserTry disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter. If you have security software, try turning it off temporarily, and look in the settings for a more long-term solution.

Can I install Jupyter notebook and JupyterLab?

JupyterLab uses the exact same Notebook server and file format as the classic Jupyter Notebook, so that it is fully compatible with the existing notebooks and kernels. The Classic Notebook and Jupyterlab can run side to side on the same computer.


2 Answers

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() 
like image 187
Md Sirajus Salayhin Avatar answered Sep 21 '22 08:09

Md Sirajus Salayhin


  1. If Anaconda is installed and the Jupyter-Notebook with it (should be the standard install), open up the Anaconda prompt, not the Windows command prompt or the Anaconda Navigator
  2. Look up the executable of R (not Rgui or Rstudio), it should be somewhere like C:\Program Files\R\R-3.5.1\bin and remember the path typing cd C:\Program Files\R\R-3.5.1\bin and start R by typing R
  3. typing IRkernel::installspec()
  4. Now you can start an R kernel within Jupyter-Notebook
like image 28
刘川枫 Avatar answered Sep 17 '22 08:09

刘川枫