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.
I have solved with this:
sudo ln -s /home/'my user name'/anaconda3/bin/jupyter /usr/bin/jupyter
Here a way to overcome this problem. I have installed IRkernel with anaconda in my mac (I guess is the same on Linux). The below command also works in windows to be run on Anaconda shell and pressing y after a y/n prompt (you can also refer https://medium.com/@kyleake/how-to-install-r-in-jupyter-with-irkernel-in-3-steps-917519326e41)
I typed:
conda install -c r r-irkernel
Then I started started R typing:
R
Finally, I have install the kernelspec to tell Jupyter about IRkernel, with the option user=FALSE for installation in the global environment:
IRkernel::installspec(user=FALSE)
Hope it helps!
cd C:\Program Files\R\R-3.5.1\bin
and start R by typing R
IRkernel::installspec()
I had the same error while trying to install my environment as kernel in Jupyter. First I had created a new environment, installed R, IRkernel and devtools from within conda prompt, then runned R typing R
from the prompt and typing
IRkernel::installspec(name = 'myenvname', displayname = 'myenvname')
I had the same error. I solved simply in this way:
conda install -c anaconda jupyter_client
And then retyping the previous code it just worked.
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')
IRkernel::installspec()