简体   繁体   中英

Trouble downloading non CRAN packages

I want to download https://github.com/AdrianAntico/RemixAutoML however I get an error that the package CatBoost (which is a dependency of RemixAutoML) Error: unable to access index for repository https://github.com/catboost/catboost/tree/master/catboost/R-package/src/contrib

So I tried to download it manually from ' https://github.com/catboost/catboost/releases/download/v0.6.1.1/catboost-R-Windows-0.6.1.1.tgz ' but I get Error:

Error in findpack(package, lib.loc) : there is no package called 'catboost' Calls: -> findpack Execution halted ERROR: lazy loading failed for package 'catboost' * removing 'FilePath' Error in ip(...) : (converted from warning) installation of package 'C:/Users/jarlan/AppData/Local/Temp/RtmpoJEuqk/file20e059cf378c/catboost_0.6.1.1.tar.gz' had non-zero exit status

I don't know what to do.

This is the code I ran 
```{r}

#Code that was part of the instructions for downloading RemixAutoML 
to_install <- c("catboost", "caTools", "data.table", "doParallel", "foreach", "forecast", "ggplot2", "h2o", "itertools", "lubridate", "monreg", "pROC", "RColorBrewer", "recommenderlab", "ROCR", "scatterplot3d", "stringr", "tm", "tsoutliers", "wordcloud", "xgboost", "zoo")
for (i in to_install) {
  message(paste("looking for ", i))
  if(i == "catboost" & !requireNamespace(i)) {
    devtools::install_url('https://github.com/catboost/catboost/releases/download/v0.6.1.1/catboost-R-Windows-0.6.1.1.tgz')
  } else if(i == "h2o" & !requireNamespace(i)) {
    if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
    if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }
    pkgs <- c("RCurl","jsonlite")
    for (pkg in pkgs) {
      if (! (pkg %in% rownames(installed.packages()))) { install.packages(pkg) }
    }
    install.packages("h2o", type="source", repos="https://h2o-release.s3.amazonaws.com/h2o/rel-yates/3/R")
  } else if (!requireNamespace(i)) {
    message(paste("     installing", i))
    install.packages(i)
  }
}
#now to install the package
devtools::install_github('AdrianAntico/RemixAutoML', force = TRUE, dependencies = TRUE, upgrade = FALSE)

I had the same problem, the problem is the package catboost i remove this package of the code thath your put and i achieved to install the other packages,

        to_install <- c("caTools", "data.table", "doParallel", "foreach", "forecast", "ggplot2", "h2o", "itertools", "lubridate", "monreg", "pROC", "RColorBrewer", "recommenderlab", "ROCR", "scatterplot3d", "stringr", "tm", "tsoutliers", "wordcloud", "xgboost", "zoo")

for (i in to_install) {message(paste("looking for ", i))if(i == "catboost" &
    !requireNamespace(i)) {devtools::install_url('https://github.com/catboost/catboost/releases/download/v0.6.1.1/catboost-R-Windows-0.6.1.1.tgz')
      } else if(i == "h2o" & !requireNamespace(i)) {
        if ("package:h2o" %in% search()) { detach("package:h2o", unload=TRUE) }
        if ("h2o" %in% rownames(installed.packages())) { remove.packages("h2o") }
        pkgs <- c("RCurl","jsonlite")
        for (pkg in pkgs) {
          if (! (pkg %in% rownames(installed.packages()))) { install.packages(pkg) }
        }
        install.packages("h2o", type="source", repos="https://h2o-release.s3.amazonaws.com/h2o/rel-yates/3/R")
      } else if (!requireNamespace(i)) {
        message(paste("     installing", i))
        install.packages(i)
      }
    }

after that you need to install catboost manually library(devtools) devtools::install_url('https://github.com/catboost/catboost/releases/download/v0.6.1.1/catboost-R-Windows-0.6.1.1.tgz', args = c("--no-multiarch"))

hence you can run

 # Depending on the development state (future versions, etc.) you can install via:
devtools::install_github('AdrianAntico/RemixAutoML', upgrade = FALSE)
devtools::install_github('AdrianAntico/RemixAutoML', upgrade = FALSE, dependencies = FALSE, force = TRUE)

and this is all, if you didn´t have luck install catboost from the link above try with other that you find maybe you need to try several times this is the more difficult part of the process.

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