简体   繁体   English

无法下载非CRAN软件包

[英]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 我想下载https://github.com/AdrianAntico/RemixAutoML但是我得到一个错误,包CatBoost(这是RemixAutoML的依赖)错误:无法访问存储库的索引https://github.com/catboost/ catboost /树/主/ catboost / R-包/ 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: 所以我试图从' https://github.com/catboost/catboost/releases/download/v0.6.1.1/catboost-R-Windows-0.6.1.1.tgz '手动下载它,但我得到错误:

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 findpack(package,lib.loc)中出错:没有名为'catboost'的包调用: - > findpack执行暂停错误:包'catboost'延迟加载失败*删除'FilePath'错误ip(...): (从警告转换)软件包'C:/Users/jarlan/AppData/Local/Temp/RtmpoJEuqk/file20e059cf378c/catboost_0.6.1.1.tar.gz'的安装具有非零退出状态

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, 我遇到了同样的问题,问题是包catboost我删除了这个代码包,你的put和我实现安装其他包,

        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")) 之后你需要手动安装catboost 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. 这就是全部,如果你没有运气从上面的链接安装catboost尝试与你发现的其他可能你需要尝试几次这是这个过程中更困难的部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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