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.
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:
I have solved with this:
sudo ln -s /home/'my user name'/anaconda3/bin/jupyter /usr/bin/jupyter
I had the same issue; I added the following in the ~/.bashrc (and
source
) and then tried runningIRkernel::installspec()
and it worked:I had the same problem but none of the above solutions worked for me. I was using Debian 9 with the default versions of python and R. I had to delete installed programs and compile latest versions of both from source. For Python compiling I had to use this configuration https://github.com/sloria/TextBlob/issues/173
I had the same error, but in my case, I have jupyter installed in a virtual environment, so I had to start R after installing the virtual environment in order for IRkernel::installspec() to succeed.
On some Windows systems you may not succeed even if you run R from cmd / powershell. That's the case on my machine. My workaround is to run R from Anaconda Prompt (if you installed Jupyter via Anaconda). You may need to specify the full path if R is not on your
PATH
.I think this is some problem related to the
PATH
, however I had no luck addingAnaconda\Lib\site-packages\jupyter_client
to my systemPATH
.