I have tried different things to install the lightgbm
package but I can´t get it done. I tried all methods at the github repository but they don't work.
I run Windows 10 and R 3.5 (64 bit). There is someone with similar problems. So I tried his solution:
-->
devtools::install_github("Laurae2/lgbdl", force = TRUE)
library(lgbdl)
lgb.dl(commit = "master",
compiler = "vs",
repo = "https://github.com/Microsoft/LightGBM")
*** arch - i386
installing via 'install.libs.R' to C:/Users/X1/Documents/R/win-
library/3.5/lightgbm
Error in eval(ei, envir) : Cannot find lib_lightgbm.dll
* removing 'C:/Users/XXX/Documents/R/win-library/3.5/lightgbm'
In R CMD INSTALL
installation of package
�C:/Users/XXX/AppData/Local/Temp/RtmpczNLaN/LightGBM/R-package� had non-
zero exit status[1] FALSE
Any idea how to fix this?
It works for me, hope it helps.
Make sure you install all mandatory software
Download the precomplied .dll file from https://github.com/Microsoft/LightGBM/releases and put it in .\LightGBM\
In install.libs.R, set use_precompile <- TRUE
Copy CMakeLists.txt from root directory into .\LightGBM\R-package\inst\bin
In R console type: install.packages(file.path("C:\yourdirectory\", "LightGBM", "R-package"), repos = NULL, type = "source")
For some poor soul struggling through this and if the above mentioned fixes did not work. What I had to do to get it working was:
Ensure you have the following in your path environment variables:
Rtools (point to the bin folder in the install directory of rtools)
Rtools mingw_64 (point to the mingw_64 folder in the rtools install directory)
Base R (point to the bin folder in your base R install directory, i.e. where you install R version whatever)
CMake (point to the bin folder in your cmake install directory)
Visual Studio (allows you to build with VS Build Tools, otherwise will fallback to RTools or any MinGW64 available as stated on the github page)
Git
Before installing LightGBM, install the following packages in R itself:
data.tools
magrittr
R6
jsonlite
Once all the above is done, run with the git installation instructions as on the github page here
For those not able to access the link (or if it should move), the command are the following:
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
Rscript build_r.R
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With