【发布时间】:2019-06-24 09:34:23
【问题描述】:
我正在尝试在 r 3.5.2 中安装 Lightgbm 库。经过数百万次尝试我可以这样做。谁知道怎么安装?
我尝试了这些方法来安装 lightgbm,但总是出现这种类型的错误。
1.
i.p(...) 中的错误: (从警告转换)包“C:/Users/MUHAMM~1/AppData/Local/Temp/Rtmp4EX73g/file7d81a401a17/lightgbm_2.2.3.tar.gz”的安装具有非零退出状态 另外:警告信息: 1:在 untar2(tarfile, files, list, exdir) 中: 跳过 pax 全局扩展标头 2:在 untar2(tarfile, files, list, exdir) 中: 跳过 pax 全局扩展标头
2.
lgb.dl 中的错误(commit = "master", compiler = "vs", repo = "https://github.com/Microsoft/LightGBM", : 找不到函数“lgb.dl”
#1
install.packages('devtools')
packageurl <- "http://cran.r-project.org/src/contrib/Archive/lightgbm/lightgbm_3.5.2.tar.gz"
install.packages(packageurl, contriburl=NULL, type="source")
#2
download.file("https://github.com/hadley/lightgbm/archive/master.zip", destfile = "lightgbm.zip")
#3
lgb.dl(commit = "master",libdll = "C:\\xgboost\\LightGBM\\windows\\x64\\DLL\\lib_lightgbm.dll",
# repo = "https://github.com/Microsoft/LightGBM",cores = 2)
#4
lgb.dl(commit = "master", libdll = "C:\\LightGBM\\windows\\x64\\DLL\\lib_lightgbm.dll", # YOUR PRECOMPILED DLL
#repo = "https://github.com/Microsoft/LightGBM")
lgb.dl 中的错误(commit = "master", compiler = "vs", repo = "https://github.com/Microsoft/LightGBM", : 找不到函数“lgb.dl”
#5
lgb.dl(commit = "master", compiler = "vs", # Remove this for MinGW + GPU installation repo = "https://github.com/Microsoft/LightGBM", use_gpu = TRUE)
#6
lgb.dl(commit = "master", compiler = "vs", # Remove this for MinGW + GPU installation repo = "https://github.com/Microsoft/LightGBM",use_gpu = TRUE)
【问题讨论】:
-
你满足所有的包裹要求吗? “准备工作需要先安装git和CMake。注意:不支持32位R/Rtools。Windows准备安装Rtools是强制性的,只支持64位版本。需要在PATH中添加Rtools MinGW64文件夹,如果在安装过程中没有自动完成。”
-
我已经安装了 git & CMake。我有 64 位 R/Rtools。现在我不知道如何添加 Rtools MinGW64 文件夹的路径。
-
您是否使用以下策略搜索过 SO:
[r] add path to the Rtools MinGW64。我不是 Windoze 用户(至少在过去 5 年内不是),但当我这样做时,我得到了一些有用的信息。 -
我也遇到了同样的问题,你解决了吗?
-
Rana Usman 到现在我还没有成功解决这个问题。