No RTools compatible with R version 3.5.0 was found

前端 未结 3 727
生来不讨喜
生来不讨喜 2020-11-29 07:23

I had problems installing data.table for R version 3.5.0, and was advised to check that RTools was properly installed.

After installing RTools 3.5 (this seems to be

相关标签:
3条回答
  • 2020-11-29 08:12

    UPDATE

    The utility find_rtools has been moved to the package pkgbuild (as noted in devtools News). The function pkgbuild::find_rtools() correctly discovers Rtools 3.5 in my system.

    Old answer

    I had this same problem and it occurs because devtools has not been updated to consider the newest version of RTools (3.5). Here is an easy fix that should work while they update the package:

    # add missing RTools 3.5 info
    v_i = devtools:::version_info
    v_i[["3.5"]] = v_i[["3.4"]]
    v_i[["3.5"]]$version_max = "3.5.99"
    assignInNamespace(x     = "version_info",
                      value = v_i,
                      ns    = "devtools")
    
    # now find_rtools should work properly
    devtools::find_rtools()
    

    Of course, this approach assumes that devtools::find_rtools worked for you before updating R and RTools. If this is not the case, then you might have a faulty installation and/or PATH variable as others have mentioned.

    0 讨论(0)
  • 2020-11-29 08:28

    The problem was Rtools 3.5 was not in your Windows system PATH thus find_rtools couldn't find it. Another possibility was that an incompatible version of Rtools was in the PATH

    Best practice for installing Rtools:

    • Download the latest version

    • Install RTools at default recommended location (at the root of your C drive): C:/Rtools/

    • <Important> Check the box that allows Rtools to modify system PATH

    After the installation, we can double check by running this command inside R

    R> Sys.getenv('PATH')
    [1] "C:\\Program Files\\R\\R-3.5.0\\bin\\x64;c:\\Rtools\\bin;c:\\Rtools\\mingw_64\\bin;
    

    See also this guide


    Edit: for those who don't have Administration rights, see these links:

    • Rtools with R portable
    • Building R packages on Windows without administrator access
    • Setting up RStudio Portable Default R version
    0 讨论(0)
  • 2020-11-29 08:29

    I'm quite sure RTools 3.5 works with R-3.5 . I haven't used find_rtools() before, but I did manage to compile data.table from source a week ago. Here's how I did it:

    After installing R 3.5 and RTools 3.5, I manually checked/modified the following system-envs (somehow the RTools installer failed to do this automatically, so I went through the readme from RTools and do it manually): BINREF = "C:/Rtools/mingw_$(WIN)/bin/" (with "s, slashes are /) PATH = ";C:\Rtools\bin" ("s are optional , slashes are \ )

    Then I downloaded the source package for data.table(was version 1.10.4-3) and ran R CMD INSTALL data.table_1.10.4-3.tar.gz from windows command-line. With a working RTools, the package would successfully compile. I also tried the install.packages(data.table) from R-GUI, where I got pop-up window to confirm compilation from source.

    Anyway, I believe cran now provides a working windows-binary for data.table, so using RTools is no longer necessary.

    0 讨论(0)
提交回复
热议问题