Windows Install without Admin Rights



Operating System: Windows 7 Enterprise
Interface Version: TBD
Compiler/Toolkit: TBD

Is there a way to install Stan on a Windows 7 machine without admin rights? I could use Matlab, R, or Python, or I would be willing to learn something new if it worked. I believe the roadblock is needing the C++ compiler, since I have access to My Docs, where I installed RStudio, for example.

Does anyone have any ideas?



You can install RTools as a regular user
at which point you could use RStan or any other interface to Stan. Or is the issue that you are not allowed to install any R packages?


You can also install python / r with conda to a local folder. And even use the g++ (msys2) with CmdStan. See this github issue (PyStan)


So if I understand correctly, you need to do the installation on a flash drive on another computer that you have admin rights on, then copy the files over?

On my computer, Rtools installs somewhat, but is not allowed to edit my registry due to privileges.

I believe that I can install R packages, as I have done that in the past.


Yeah, the registry thing is annoying. One thing you can do from R is something like

Sys.setenv(PATH = paste0("C:\\Rtools,", "C:\\Rtools\bin,", 

or whatever is the correct path to where you have Rtools installed. You can even put that line into a .Rprofile file in your home directory so that it gets executed automatically at startup without you having to type it out each time.


You can also set your user’s path independently of the system path. It will be prepended to the system path when R tries to use it. Just search for “environment variables” in the start menu or control panel.

Disappearing topic?

I just attempted an install RStan without admin rights on very locked down Windows Server 2012 R2. I tried various work-arounds, but could not get things to work. In particular, with directories on M: in my path for RTools, the tools attempt to invoke programs on c:.

I installed RTools to a local directory (that I could write to) and checked the option to modify the environment variables. But the installer/OS gave an error that it could not write to the variable. I told it to ignore the error and continue.

Since I neglected to note the exact paths, I guessed later about 2 bin directories in R Tools. I added this line to my .Rprofile:
Sys.setenv(Path=paste0("M:\\Rtools\\bin;M:\\Rtools\\mingw_64\\bin;", Sys.getenv("PATH")))
(basically the procedure in Windows Install without Admin Rights). However, RStudio seemed insensitive to this, since when I restarted it and did Sys.getenv(“Path”) the new values weren’t there.

I inserted them in the session; system(“g++ -v”) worked OK, but the final test failed:
`> Sys.getenv(“Path”)
[1] “M:\Rtools\bin;M:\Rtools\mingw_64\bin;C:\Program Files\R\R-3.4.0\bin\x64;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Dell\SysMgt\oma\bin;C:\Program Files\Dell\SysMgt\shared\bin;C:\Program Files\Dell\SysMgt\idrac;C:\Program Files\SASHome\SASFoundation\9.4\ets\sasexe;C:\Program Files\SASHome\Secure\ccme4;C:\Program Files\SASHome\x86\Secure\ccme4”

fx <- inline::cxxfunction( signature(x = “integer”, y = “numeric” ) , ’

  • return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
  •                        ' )

c:/Rtools/mingw_64/bin/g++: not found`

Actually, the error seems to be right there: my path says to use M:\Rtools, but it’s trying to run C:\Rtools…

The log continues:
make: *** [filed7dc2ec2644b.o] Error 127
Warning message:
running command ‘make -f “C:/PROGRA~1/R/R-34~1.0/etc/x64/Makeconf” -f “C:/PROGRA~1/R/R-34~1.0/share/make/” -f “C:/Users/RoBoylan/Documents/.R/Makevars” SHLIB_LDFLAGS=’(SHLIB_CXXLDFLAGS)' SHLIB_LD='(SHLIB_CXXLD)’ SHLIB=“filed7dc2ec2644b.dll” WIN=64 TCLBIN=64 OBJECTS=“filed7dc2ec2644b.o”’ had status 2

ERROR(s) during compilation: source code errors or compiler configuration errors!

BTW, the MS Windows user profile editor does let me edit the environment variables. I tried adding Path in the user-specific area (it already appears, greyed out, in the system area), but even after I logged off and back in it didn’t seem to matter. That is, when I started a command prompt and did echo %Path% I only got the system values.

For now, I switched the Linux, and seem to have got a working installation there.

Disappearing topic?