I am trying to follow this guide to get R as a usable language in jupyter notebook.
The first step is to run:
install.packages(c('repr', 'IRdisplay', 'evaluate', 'crayon', 'pbdZMQ', 'devtools', 'uuid', 'digest'))
But even after running this command, I still cannot execute the next step:
devtools::install_github('IRkernel/IRkernel')
returning the error:
Error in loadNamespace(name) : there is no package called ‘devtools’
If you look at the comment section of the link I posted someone else seems to also have run into this problem.
Update:
Scott Richie suggested I rerun install.packages('devtools')
this returned:
The downloaded source packages are in
‘/tmp/RtmpgBI8IU/downloaded_packages’
Warning messages:
1: In install.packages("devtools") :
installation of package ‘curl’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘openssl’ had non-zero exit status
3: In install.packages("devtools") :
installation of package ‘git2r’ had non-zero exit status
4: In install.packages("devtools") :
installation of package ‘httr’ had non-zero exit status
5: In install.packages("devtools") :
installation of package ‘gh’ had non-zero exit status
6: In install.packages("devtools") :
installation of package ‘usethis’ had non-zero exit status
7: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
UPDATE 2:
I read up on related threads and was able to get devtools. but I ran into the problem:
> IRkernel::installspec()
Error in IRkernel::installspec() :
jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 1.
This other thread had exited with code 127 and none of the solution did not work in my case. : jupyter-client has to be installed but “jupyter kernelspec --version” exited with code 127
Related
I am trying to install R Shiny on Azure , Linux (centos 8.2.2004). Using the manual : https://linuxize.com/post/how-to-install-r-on-centos-7/
However I can not install packages. I receive error :
"ERROR: failed to lock directory ‘/usr/lib64/R/library’ for modifying Try removing ‘/usr/lib64/R/library/00LOCK-Rcpp’ ERROR: dependency ‘Rcpp’ is not available for package ‘later’
* removing ‘/usr/lib64/R/library/later’ ERROR: dependencies ‘Rcpp’, ‘later’ are not available for package ‘promises’
* removing ‘/usr/lib64/R/library/promises’ ERROR: dependencies ‘Rcpp’, ‘promises’, ‘later’ are not available for package ‘httpuv’
* removing ‘/usr/lib64/R/library/httpuv’ ERROR: dependencies ‘httpuv’, ‘later’, ‘promises’ are not available for package ‘shiny’
* removing ‘/usr/lib64/R/library/shiny’
The downloaded source packages are in
‘/tmp/RtmpGIfMqF/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning messages: 1: In install.packages("shiny") : installation of package ‘Rcpp’ had non-zero exit status 2: In install.packages("shiny") : installation of package ‘later’ had non-zero exit status 3: In install.packages("shiny") : installation of package ‘promises’ had non-zero exit status 4: In install.packages("shiny") : installation of package ‘httpuv’ had non-zero exit status 5: In install.packages("shiny") : installation of package ‘shiny’ had non-zero exit status"
I have tried to fix the issue however , was able. If you have some ideas, please advice, thanks.
I solved the problem finally. There was necessary to delete the folder :
sudo rm -rf /usr/lib64/R/library/00LOCK-Rcpp
Then tried instal shiny package again and worked fine.
I just started using RStudio on Azure Databricks. After I select the cluster and click on the Libraries tab I managed to install few extra packages (timetk, tidymodels, rules, doFutures). But when I tried to install the modelitme package I got the following error:
java.lang.RuntimeException: Installation failed with message:
Error installing R package: Could not install package with error: installation of package ‘V8’ had non->zero exit status installation of package ‘rstan’ had non-zero exit status installation of package >‘prophet’ had non-zero exit status installation of package ‘modeltime’ had non-zero exit status Full >error log available at /databricks/driver/library-install-logs/r-package-installation-2020-10->03T10:31:18Z-vcap9s0e.log
Error installing R package: Could not install package with error: installation of package ‘V8’ had non->zero exit status installation of package ‘rstan’ had non-zero exit status installation of package >‘prophet’ had non-zero exit status installation of package ‘modeltime’ had non-zero exit status
How do I solve problem like this?
I've been trying to install devtools in R on MacOS, first by using in RStudio:
install.packages("devtools")
and then using as an alternative:
install.packages("devtools",lib="/usr/local/Cellar/r/3.6.0_3/lib/R/library")
This gave permission errors, therefore I then used the terminal:
sudo R
then using the same commands as in RStudio to install the package, which gave me the following error(s) for both commands:
1: In install.packages("devtools", lib = "/usr/local/Cellar/r/3.6.0_3/lib/R/library") :
installation of package ‘xml2’ had non-zero exit status
2: In install.packages("devtools", lib = "/usr/local/Cellar/r/3.6.0_3/lib/R/library") :
installation of package ‘roxygen2’ had non-zero exit status
3: In install.packages("devtools", lib = "/usr/local/Cellar/r/3.6.0_3/lib/R/library") :
installation of package ‘devtools’ had non-zero exit status
I do not have experience using R, and the solutions mentioned online when using Ubunu or CentOS do not work.
Please let me know if you have suggestions on how to install devtools and what is causing these errors, any suggestions are highly appreciated.
Thank you in advance!
Using dependencies=TRUE does a lot more installations, but still gives the following result:
The downloaded source packages are in
‘/private/tmp/RtmptCt93z/downloaded_packages’
Warning messages:
1: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘xml2’ had non-zero exit status
2: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘RCurl’ had non-zero exit status
3: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘rvest’ had non-zero exit status
4: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘roxygen2’ had non-zero exit status
5: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘rversions’ had non-zero exit status
6: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘spelling’ had non-zero exit status
7: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘rsconnect’ had non-zero exit status
8: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘foghorn’ had non-zero exit status
9: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘devtools’ had non-zero exit status
10: In install.packages("devtools", dependencies = TRUE) :
installation of package ‘pkgdown’ had non-zero exit status
I tried manually adding the path shown in RStudio to my .bash_profile, which resulted in my terminal not knowing any commands (sudo, nano, etc) anymore, which way would be the correct one to do this, is maybe the path to R the problem?
> R.home()
[1] "/usr/local/Cellar/r/3.6.0_3/lib/R"
I finally solved it by downloading devtools directly via https://cran.r-project.org/web/packages/devtools/devtools.pdf (as suggested by #NelsonGon)
Then moving that folder to R.home()/library
then running devtools using sudo in the terminal to install github packages.
I just started using R in Fedora 25, but could not install any packages in R GUI or RStudio. Take dplyr for example,
I got the the message as below:
The downloaded source packages are in
'/tmp/RtmpM3VRo3/downloaded_packages'
Updating HTML index of packages in '.Library'
Making 'packages.html'...done
Warning messages:
1: In install.packages(“dplyr”):
installation of package 'glue' had non-zero exit status
2: In install.packages(“dplyr”):
installation of package 'rlang' had non-zero exit status
3: In install.packages(“dplyr”):
installation of package 'Rcpp' had non-zero exit status
4: In install.packages(“dplyr”):
installation of package 'bindrcpp' had non-zero exit status
5: In install.packages(“dplyr”):
installation of package 'tibble' had non-zero exit status
6: In install.packages(“dplyr”):
installation of package 'dplyr' had non-zero exit status
Then I use library(dplyr) to check if the package has been installed, and got the message:
there is no package called 'dplyr'
I'm on Ubuntu 12.04.5 and have R v.3.1.3 installed.
I'm using the command
install.packages("ggvis")
And that yields
ERROR: dependency ‘mime’ is not available for package ‘shiny’
* removing ‘/home/milia/R/x86_64-pc-linux-gnu-library/3.1/shiny’
ERROR: dependency ‘shiny’ is not available for package ‘ggvis’
* removing ‘/home/milia/R/x86_64-pc-linux-gnu-library/3.1/ggvis’
The downloaded source packages are in
‘/tmp/Rtmp6Cz9En/downloaded_packages’
Warning messages:
1: In install.packages("ggvis") :
installation of package ‘shiny’ had non-zero exit status
2: In install.packages("ggvis") :
installation of package ‘ggvis’ had non-zero exit status
So I figured I had to install shiny first. So I typed
install.packages("shiny")
Which gave:
ERROR: dependency ‘mime’ is not available for package ‘shiny’
* removing ‘/home/milia/R/x86_64-pc-linux-gnu-library/3.1/shiny’
The downloaded source packages are in
‘/tmp/Rtmp6Cz9En/downloaded_packages’
Warning message:
In install.packages("shiny") :
installation of package ‘shiny’ had non-zero exit status
So I thought installing mime.
Did as usual
install.packages("mime")
Which gave
Warning message:
In install.packages("mime") :
installation of package ‘mime’ had non-zero exit status
I'm not sure what to do next, and the similar problems in stack with a non-zero exit status didn't help much.
My Rprofile can be found here.