No RTools compatible with R version 3.5.0 was found
Asked Answered
E

3

19

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 the latest) I typed

find_rtools(T)

I got the following message:

WARNING: Rtools is required to build R packages, but no version 
of Rtools compatible with R 3.5.0 was found. 
(Only the following incompatible version(s) of Rtools were found:3.4,3.5)

Please download and install the appropriate version of Rtools from 
http://cran.r-project.org/bin/windows/Rtools/.

So on the one hand it looks like I do have 3.5 installed, but it seems to think there is a newer/different version.

Any thoughts?

Eozoic answered 26/4, 2018 at 4:43 Comment(3)
The second link in particular is very useful! My guess is that your most recent RTools is not in your PATH. Or it is in your PATH but another (incompatible) Rtools version takes precedence.Taurus
@Tung you should make this an answer - it was really helpful!Gallaway
@kath: add an answer as you suggested. Thanks!Zounds
Z
17

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

enter image description here enter image description here

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:

Zounds answered 10/5, 2018 at 17:59 Comment(0)
H
3

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.

Hagen answered 2/5, 2018 at 12:3 Comment(0)
H
2

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.

Hemiterpene answered 4/5, 2018 at 8:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.