Rstan install Windows 7 fail

installation
rstan
#1

I followed:

I downloaded and installed Rtools35, then copied the steps in Configuration, Installing RStan from source.

I get this type of error messages:

Warning in file(con, “w”) :
cannot open file ‘…smitchell/R/win-library/3.5/StanHeaders/doc/index.html’: No such file or directory
Error in file(con, “w”) : cannot open the connection
ERROR: installing vignettes failed
removing ‘…smitchell/R/win-library/3.5/StanHeaders’
In R CMD INSTALL
Warning in install.packages :
installation of package ‘StanHeaders’ had non-zero exit status

ERROR: dependencies ‘StanHeaders’, ‘gridExtra’, ‘loo’ are not available for package ‘rstan’

  • Operating System = Windows 7 Professional, 64-bit Operating System

  • R version 3.5.2 (2018-12-20)

  • RStan Version - can’t install

  • Output of writeLines(readLines(file.path(Sys.getenv("HOME"), ".R/Makevars.win")))
    CXX14FLAGS=-O3 -march=native
    CXX14 = g++ -m$(WIN) -std=c++1y
    CXX11FLAGS=-O3 -march=native

  • Output of devtools::session_info("rstan")

  • Session info -------------------------------------------------------------------------------------------------------------------------------------------------------
    setting value
    version R version 3.5.2 (2018-12-20)
    os Windows 7 x64 SP 1
    system x86_64, mingw32
    ui RStudio
    language (EN)
    collate English_United States.1252
    ctype English_United States.1252
    tz America/New_York
    date 2019-04-04

  • Packages -----------------------------------------------------------------------------------------------------------------------------------------------------------
    ! package * version date lib source
    R rstan [?]

[1] …smitchell/R/win-library/3.5
[2] C:/Program Files/R/R-3.5.2/library

R – Package was removed from disk.

#2

Are you able to install a VM and build Ubuntu on it?

#3

Is that the only solution? :(

#4

What does the gcc --version say?

#5

Fortunately, no that is not the only solution. It is usually not necessary to install StanHeaders from source, in which case you could just use the binary. I don’t know why it is looking for doc/index.html because StanHeaders has no doc. If you are going to build it from source you could pass "--no-build-vignettes" to INSTALL_opts to bypass that part.

#6

No, rstan will ultimately install fine on Windows. If you needed it working quickly I think attempting to install it on a different setup makes sense. One could have a Ubuntu VM with rstan up in <1hr. Maybe it’s not the best advice but it would provide a usable alternative until help arrives.

#7

hmm am I doing something silly?
install.packages("rstan", type = "source", INSTALL_opts = "--no-build-vignettes")

Warning: unknown option '--no-build-vignettes'

#8

I think that should only be necessary for StanHeaders (or you can install it as a binary). For RStan, you can build the vignettes if you want.

#9

I still can’t get either StanHeaders or rstan to install, in both cases I get the warning that --no-build-vignettes is not an option.

#10

OK, that is just an option for building the package rather than installing it. But I don’t even know what setting there is no tell it to try to build the vignettes when installing. When I do it on Windows, I just get a lot of compilation messages and then

installing via 'install.libs.R' to C:/Users/Stan/Documents/R/win-library/3.5/StanHeaders
** inst
** help
No man pages found in package  'StanHeaders' 
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
*** arch - i386
*** arch - x64
* DONE (StanHeaders)
In R CMD INSTALL

so it seems to be just copying the vignettes from the .tar.gz file rather than re-executing the code in them.