New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find_rtools() doesn't recognize Rtools 3.5 in R 3.5.0 #1772

Closed
krshedd opened this Issue Apr 23, 2018 · 29 comments

Comments

Projects
None yet
@krshedd
Copy link

krshedd commented Apr 23, 2018

I installed Rtools 3.5 from here, but when I run find_rtools() in the latest release of R 3.5.0 I get this

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.1,3.2,3.3,3.4,3.5) Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.

@EricMarcon

This comment has been minimized.

Copy link

EricMarcon commented Apr 24, 2018

It seems that devtools:::version_info$3.5 is missing.

Also, devtools:::version_info$3.4$version_max is "3.4.99" so Rtools 3.5 cannot be used with R 3.4.4..

It seems to be the same issue as pkgbuild issue #38 but devtools has not been updated yet.

@jackwasey

This comment has been minimized.

Copy link

jackwasey commented Apr 25, 2018

to be clear, a workaround is to use library(pkgbuild) with an updated pkgbuild after loading devtools

@krshedd

This comment has been minimized.

Copy link

krshedd commented Apr 25, 2018

Thanks for the workaround Jack, much appreciated. This allowed be to be able to use devtools::install_github to download other R packages from GitHub that require Rtools to build them.

Here is the code just in case anyone else has this issue.
install.packages("pkgbuild") # pkgbuild is not available (for R version 3.5.0)
install.packages("devtools") # make sure you have the latest version from CRAN
library(devtools) # load package
devtools::install_github("r-lib/pkgbuild") # install updated version of pkgbuild from GitHub
library(pkgbuild) # load package
find_rtools() # should be TRUE, assuming you have Rtools 3.5

I'll leave this issue open for now since this workaround doesn't really close the underlying issue.

@EricMarcon

This comment has been minimized.

Copy link

EricMarcon commented Apr 26, 2018

Unfortunately, it does not work on Windows: devtools::install_github("r-lib/pkgbuild") fails because the CRAN version of devtools does not accept either R 3.5 nor Rtools 3.5 to compile it.
We need a binary of pkgbuild on CRAN first to allow using Rtools.

I went back to R 3.4.4 and Rtools 3.4 until pkgbuild is on CRAN.

@jimhester jimhester added the bug label May 4, 2018

@aparpara

This comment has been minimized.

Copy link

aparpara commented May 13, 2018

This workaround works for me:
library(devtools)
assignInNamespace("version_info", c(devtools:::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools")
find_rtools() # is TRUE now

@urwa

This comment has been minimized.

Copy link

urwa commented May 29, 2018

Windows 10 x64
I was getting the same error while installing rPython package.

I followed the workaround code by krshedd and got find_rtools() is TRUE now.

The problem is when I try to install rPython using install("C:/Users/urwa/Downloads/rPython")
and I am back with the same error

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.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Error: Could not find build tools necessary to build rPython

@wch

This comment has been minimized.

Copy link
Member

wch commented May 31, 2018

If you install the development version of devtools, it will work. First, use @aparpara's workaround, then upgrade devtools:

library(devtools)
assignInNamespace("version_info", c(devtools:::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools")
find_rtools() # is TRUE now

devtools::install_github("r-lib/devtools")
@rjrich

This comment has been minimized.

Copy link

rjrich commented Jun 2, 2018

@wch: Thanks for the tip about installing the development version of devtools! This enabled me to install the development version of the "philentropy" package in Windows 10 ver 1709. Thanks also to @aparpara for the initial workaround.

@bshor

This comment has been minimized.

Copy link

bshor commented Jun 6, 2018

When I tried this I'm getting errors for loading any other package...

Error: package or namespace load failed for ‘haven’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]):
 there is no package called ‘Rcpp’

How do I reverse this? My R installation is screwed (for now)...

@guilhermefrias23

This comment has been minimized.

Copy link

guilhermefrias23 commented Jun 19, 2018

Thank you! It worked really well!

@kevinushey

This comment has been minimized.

Copy link
Contributor

kevinushey commented Jul 13, 2018

Any chance that a CRAN release will be coming soon with this fix?

@jimhester

This comment has been minimized.

Copy link
Member

jimhester commented Jul 17, 2018

Yes, a CRAN release will be coming soon, in the next week or two.

@jimhester jimhester closed this Jul 17, 2018

@majusus

This comment has been minimized.

Copy link

majusus commented Jul 20, 2018

@krshedd ..thank you this work around works even for the updated versions of R and Rtools.. (Y)

@luckygoh

This comment has been minimized.

Copy link

luckygoh commented Sep 3, 2018

Hi, i followed the workaround as mentioned previously but still failed to install the xcms package via github.

library(devtools)
library(pkgbuild)

Attaching package: ‘pkgbuild’

The following objects are masked from ‘package:devtools’:

build, clean_dll, compile_dll, compiler_flags, find_rtools, has_devel, setup_rtools,
with_debug

find_rtools()
[1] TRUE
devtools::install_github("sneumann/xcms")
Downloading GitHub repo sneumann/xcms@master
from URL https://api.github.com/repos/sneumann/xcms/zipball/master
WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 3.5.1 was found. (Only the following incompatible version(s) of Rtools were found:3.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installing xcms
"C:/PROGRA~1/R/R-35 ~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD
INSTALL
"C:/Users/UM/AppData/Local/Temp/RtmpIPsMnn/devtools2a98569359a7/sneumann-xcms-f1eecf6"
--library="C:/Users/UM/Documents/R/win-library/3.5" --install-tests

*installing source package 'xcms' ...
**libs
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'xcms'

  • removing 'C:/Users/UM/Documents/R/win-library/3.5/xcms'
  • restoring previous 'C:/Users/UMSBIOTECH/Documents/R/win-library/3.5/xcms'
    Warning in file.copy(lp, dirname(pkgdir), recursive = TRUE, copy.date = TRUE) :
    problem copying C:\Users\UM\Documents\R\win-library\3.5\00LOCK-sneumann-xcms-f1eecf6\xcms\libs\x64\xcms.dll to C:\Users\UM\Documents\R\win-library\3.5\xcms\libs\x64\xcms.dll: Permission denied
    In R CMD INSTALL
    Installation failed: Command failed (1)
@samfranks

This comment has been minimized.

Copy link

samfranks commented Sep 7, 2018

Having trouble installing tweenr because of the RTools problem. I've tried the workarounds from @aparpara and @krshedd. Still getting this error:

> find_rtools()
[1] TRUE
> devtools::install_github("thomasp85/tweenr")
Downloading GitHub repo thomasp85/tweenr@master
from URL https://api.github.com/repos/thomasp85/tweenr/zipball/master
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.5)

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
Installation failed: Could not find build tools necessary to build tweenr
> sessionInfo()
R version 3.5.0 (2018-04-23)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United Kingdom.1252 
[2] LC_CTYPE=English_United Kingdom.1252   
[3] LC_MONETARY=English_United Kingdom.1252
[4] LC_NUMERIC=C                           
[5] LC_TIME=English_United Kingdom.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] pkgbuild_1.0.0  devtools_1.13.6

loaded via a namespace (and not attached):
 [1] ps_1.1.0              digest_0.6.16         crayon_1.3.4         
 [4] withr_2.1.2           assertthat_0.2.0      R6_2.2.2             
 [7] git2r_0.23.0          httr_1.3.1            curl_3.2             
[10] rstudioapi_0.7.0-9002 callr_3.0.0           tools_3.5.0          
[13] yaml_2.2.0            compiler_3.5.0        processx_3.2.0       
[16] base64enc_0.1-3       memoise_1.1.0

Any other ways to install gganimate @thomasp85?

@jimhester

This comment has been minimized.

Copy link
Member

jimhester commented Sep 7, 2018

Could you try

pkgbuild::with_build_tools(remotes::install_github("thomasp85/tweenr"))

With the CRAN versions of pkgbuild and remotes

@ankitgupta124

This comment has been minimized.

Copy link

ankitgupta124 commented Oct 21, 2018

Hi, facing trouble with rtools 3.5 on R3.5.1 windows.
It shows following message when I use find_rtools()

Error in find_rtools() : could not find function "find_rtools"

Please help.

@plnnr

This comment has been minimized.

Copy link

plnnr commented Oct 24, 2018

@jimhester This worked!

Could you try

pkgbuild::with_build_tools(remotes::install_github("thomasp85/tweenr"))

With the CRAN versions of pkgbuild and remotes

@jamesgriggs

This comment has been minimized.

Copy link

jamesgriggs commented Oct 31, 2018

Hi,

Trying the workaround with R 3.5.1 to get devtools/Rtools to work as described in this issue, but it doesn't appear to work. Any advice?

library(devtools)
assignInNamespace("version_info", c(devtools:::version_info, list("3.5" = list(version_min = "3.3.0", version_max = "99.99.99", path = "bin"))), "devtools")

Error in bindingIsLocked(x, ns) : no binding for "version_info"

find_rtools()

Error in find_rtools() : could not find function "find_rtools"

@jimhester

This comment has been minimized.

Copy link
Member

jimhester commented Oct 31, 2018

@jamesgriggs please just use the CRAN version of devtools, the workaround is no longer necessary.

@anqelnquyenx

This comment has been minimized.

Copy link

anqelnquyenx commented Nov 23, 2018

@jimhester I am having trouble with Rtools. I downloaded the latest version and followed steps 1-3 on your site https://www.r-project.org/nosvn/pandoc/devtools.html but I am still getting the message: Error in write.xlsx(simple.list, file = "simple_list.xlsx") :
could not find function "write.xlsx"

Your help is greatly appreciated. Thank you.

@ritwikguhathakurta

This comment has been minimized.

Copy link

ritwikguhathakurta commented Dec 7, 2018

Error in find_rtools() : could not find function "find_rtools"
How to reslove the issue?? Please help..

@isabelle-fischer

This comment has been minimized.

Copy link

isabelle-fischer commented Dec 7, 2018

I have the same problem. I am using R version 3.5.1 and RTools 35. I installed the devtools Package and loaded it, but I always get this error message:

Error in find_rtools() : could not find function "find_rtools"

I also tried every suggested workaround (even though they should not be necessary), but nothing works. I'm running out of ideas.

@isabelle-fischer

This comment has been minimized.

Copy link

isabelle-fischer commented Dec 7, 2018

Ah, found aother workaround!

Loaded pkgbuild and then ran find_rTools . Worked perfectly fine!

@ritwikguhathakurta

This comment has been minimized.

Copy link

ritwikguhathakurta commented Dec 7, 2018

@jimhester

This comment has been minimized.

Copy link
Member

jimhester commented Dec 7, 2018

find_rtools() was removed from devtools, it is only in pkgbuild now. If you want to call the function you need to load pkgbuild.

@ritwikguhathakurta

This comment has been minimized.

Copy link

ritwikguhathakurta commented Dec 7, 2018

@ankursworld

This comment has been minimized.

Copy link

ankursworld commented Dec 9, 2018

I have R3.5.1 and Rtools 3.5.0.4. I tried library(pkgbuild), and find_rtools() is coming TRUE. However when I run "devtools::install_github("rstudio/reticulate", force=TRUE)", I get the error below. Any suggestions are appreciated!

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

Please download and install the appropriate version of Rtools from http://cran.r-project.org/bin/windows/Rtools/.
.....
Warning in system(cmd) : 'make' not found
ERROR: compilation failed for package 'reticulate'

  • removing 'C:/.../Documents/R/win-library/3.5/reticulate'
    In R CMD INSTALL
    Installation failed: Command failed (1)
@proxteus

This comment has been minimized.

Copy link

proxteus commented Jan 19, 2019

Thanks for the workaround Jack, much appreciated. This allowed be to be able to use devtools::install_github to download other R packages from GitHub that require Rtools to build them.

Here is the code just in case anyone else has this issue.
install.packages("pkgbuild") # pkgbuild is not available (for R version 3.5.0)
install.packages("devtools") # make sure you have the latest version from CRAN
library(devtools) # load package
devtools::install_github("r-lib/pkgbuild") # install updated version of pkgbuild from GitHub
library(pkgbuild) # load package
find_rtools() # should be TRUE, assuming you have Rtools 3.5

I'll leave this issue open for now since this workaround doesn't really close the underlying issue.

Thank u @krshedd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment