简体   繁体   中英

R kernel won't start in Jupyter because package is missing

I just tried to download the R package 'plotly' but was getting the error:

cannot remove prior installation of package

The advice for this is to restart your R instance, which I did. Now the notebook won't even start it is saying:

[I 14:51:53.077 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
               Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
               there is no package called 'Rcpp'                                                                                
               Calls: :: ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart                                      
               Execution halted          

Should I try to install the package Rcpp outside of jupyter via the cli? The R development environment is so fragile that to install a package you need to restart the whole application and now it won't even start in Jupyter.

Ok so what I had to do:

open anaconda prompt

conda activate my-r-env

R (open R instance)

install.packages("Rcpp")

restart jupyter notebook instance

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM