Reputation: 4009
I'm having an issue installing R for Jupyter. It seems like the instructions are outdated. I installed the latest version of Anaconda. I'm running R 3.4.1. The following is the R script that is supposed to install the necessary kernel. I'm running this in RGui and RStudio. Both fail.
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
devtools::install_github('IRkernel/IRkernel')
IRkernel::installspec()
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘digest’
This makes no sense as I'm getting a message that says, digest was unpacked in the first step.
Error in IRkernel::installspec() : jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127. In addition: Warning message: running command '"jupyter" kernelspec --version' had status 127
Upvotes: 0
Views: 4397
Reputation: 1092
The following installation steps worked for me:
> conda create -n r_env r-essentials r-base
> source activate r_env
> conda install -c r r
> conda install -c r r-irkernel
Then while creating a new jupyter notebook, select R kernel.
Upvotes: 0
Reputation: 664
To get it working in RStudio:
PATH
variable (you can add it just for the session going to the prompt and running SET PATH=%PATH%;"insert path; insert path2
and then running rstudio.exe from the same command prompt session)Upvotes: 0
Reputation: 291
We can also configure R using conda in Jupyter. Open your command prompt and execute the following line.
conda install -c r r-essentials
If you don't want to install R-essentials in your current environment, then execute the following line.
conda create -n my-r-env -c r r-essentials
This will install r-essentials into a new environment.
For more information, follow this link.
https://www.datacamp.com/community/blog/jupyter-notebook-r
Upvotes: 1
Reputation: 4009
I was working on windows. The common advice was to work in R terminal and not RStudio. That still didn't work. The key was to add C:\Users\[user name]\Anaconda3\Lib\site-packages\jupyter_client to my path variable.
Upvotes: 0