0

I have tried to install basic packages in R using the R Jupyter lab kernel, but got this error message:

install.packages("devtools", repos='http://cran.us.r-project.org')

also installing the dependencies ‘credentials’, ‘curl’, ‘gert’, ‘gh’, ‘httr’, ‘ragg’, ‘usethis’, ‘pkgdown’, ‘rcmdcheck’, ‘rversions’, ‘urlchecker’ Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘curl’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘ragg’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘credentials’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘httr’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘rcmdcheck’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘rversions’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘urlchecker’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘gert’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘gh’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘pkgdown’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘usethis’ had non-zero exit status” Warning message in install.packages("devtools", repos = "http://cran.us.r-project.org"): “installation of package ‘devtools’ had non-zero exit status” Updating HTML index of packages in '.Library'

Making 'packages.html' ... done

I have tried to solve this problem using the following code: Cannot install R packages in Jupyter Notebook

install.packages('IRkernel')
IRkernel::installspec(user = FALSE) 

But it does not work. Any idea to fix this problem? Do you work with Jupyter lab with R kernel? Did you have this issue?

  • 1
    I'm not following what you are talking about solving with `install.packages('IRkernel')` and the line below that in the code block. Is R working already in your JupyterLab? If so, then I don't think that is the issue as Jupyter already sees the kernel and is using it. That solution got no votes there. A lot of other ones got votes and should be better to try. I thought the advice was to look into libPaths and then point Jupyter at that, see https://stackoverflow.com/questions/34705917/how-to-install-r-packages-that-are-not-available-in-r-essentials#comment82305250_35023854 ? – Wayne Dec 08 '22 at 16:48
  • 1
    Thanks for the answer, I have checked the paths with libPaths, and it is '/home/usr/anaconda3/lib/R/library'. I have added the other libraries path used by Rstudio and Jupyter lab can load them now. I can't still install packages on Jupyter lab, but I do it on Rstudio, and use them on Jupyter lab. It's a bit clunky, but it is working. – Drosera_capensis Dec 09 '22 at 14:01
  • 1
    Interesting. Defnitely clunky but glad it works. I think that was what [this answerer had also found](https://stackoverflow.com/a/39649154/8508004). – Wayne Dec 09 '22 at 15:36

0 Answers0