How to install RTools without edit %PATH% to build from source?

rtools

#1

I found some good packages without binary so have to build from source using RTools to install, but I have no right to edit the PATH.

Is there any method to bypass editing PATH and can build from source successfully?


#2

Have you installed Rtools already ?

You can modify the path in R only as their is a PATH environment variable acessible.
You can modify at startup using .Renviron file or modify in code using Sys.setenv or the helper function in devtools: devtools::add_path() (see documentation)
I think it could work for what you want to do.

Know that on windows, you can set environment variables for your user only without any admin rights. Typing PATH in windows search could lead to the right menu to modify account environment variable (not system ones)


#3

Hello

I tried this and confirmed (using Sys.getenv('PATH')) that "C:\Rtools\bin;" was appended to beginning of the path, yet doing Clean and Rebuild generated this warning:

WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/

Any suggestions on how to get this working in Windows 10 without admin rights?


#4

this is possible that it should be in the system path. You can modify your PATH variable without admin right in a windows os.

In search bar, look for Environment variable but not for the system but for the user or for the account. You can so follow these steps.

You'll be able without admin rights to add the rtools path to the PATH variable. Then it should work.


#5

Thanks a lot for the response

It turns out that I also needed to prepend "C:\Rtools\mingw_64\bin;" to the path