No Rtools Compatible with R Version 3.5.0 Was Found

No RTools compatible with R version 3.5.0 was found

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

Sample Image
Sample Image

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

RStudio not finding RTools

I have sorted the problem in this way, partly guided by the comments on the question at:

Rtools not being detected by R

Given that devtools::find_rtools() returns TRUE and the check at the end of this webpage using Rcpp (https://thecoatlessprofessor.com/programming/installing-rtools-for-compiled-code-via-rcpp/) works:

Try Sys.which("ls.exe") and Sys.which("gcc.exe"). The former should return a path, but the latter may be empty, which is the problem.

I then found another copy of gcc.exe (in my case it there was one at C:\Rtools\mingw_64\bin, which is a bit maddening) and copied it into C:\Rtools\bin, which is where RStudio seems to want it. That is where ls.exe was found using the Sys.which. That solved the problem for me.

RStudio cannot find Rtools to build package

Turns out I needed to add c:\Rtools\mingw_64\bin; to my PATH as well.

Can't install tidyverse package in R version 3.5.2

You have a very old version of R. You should update to the current version if you want things to go smoothly.

If you can't do that, here's what you'll have to do:

  • Install the version of Rtools suitable for R 3.5.x.
  • Install the packages you want. Some of them won't work, because they will need later versions of R, but won't declare that. So when you find one that fails, try installing the previous version of that package. If that also fails, try an even earlier one. Etc. Your R version was current in 2018, so you may need to go that far back in time to find compatible packages.
  • Once you finally have everything working, try to update your packages. Maybe some of them could be more recent versions, maybe not. Do them one at a time. Typically tidyverse needs about 90 of them, so this will take a while.

So I recommend that you update your R version.



Related Topics



Leave a reply



Submit