Installing RStan on Windows10


#1

hi there - i’m new to Stan and trying to set up RStan for the first time, but running into a hitch right at the start:
I’ve followed the instructions on https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started using RStudio, and it was fine until I ran the line:
pkgbuild::has_build_tools(debug = TRUE)

it loaded all sorts of content but at the end I got:
trying URL ‘https://cran.rstudio.com/bin/windows/Rtools/Rtools35.exe
Content type ‘application/x-msdownload’ length 108622512 bytes (103.6 MB)
downloaded 103.6 MB
[1] FALSE

And the instructions say not to go further til this is “TRUE”
Any tips?
thanks! :)


#2

If that returns FALSE, then there should be more to the error message.


#3

thanks - but there isn’t?! that’s why I was confused - no information on what went wrong…?


#4

I realize this may not be the answer you were looking for, but since you seem not to have a final one so far and it seems like getting this sort of “unix native” apps working on Windows can be a pain, using the Windows Subsystem for Linux (WSL, or “bash on Windows”) may be a solution to get Stan to work on Windows 10, and otherwise having a proper linux terminal if you think that would be useful more generally. It probably requires admin rights on your machine, at least to enable “developer mode”, but you can find detailed instructions on the official microsoft documentation page.

I have never installed RStan on it (or anywhere for that matter), but cmdStan and PyStan for linux (as well as any linux command line software) work without any issues on it. You should need to have an R installation separate for the on Windows since most things other than the file system don’t really interact between the WSL and the Windows OS.


#5

I think it was saying that it was FALSE that it could find the build tools and then it downloaded them. What does it say when you do pkgbuild::has_build_tools(debug = TRUE) again, possibly after a restart of RStudio.


#6

thanks for your replies!
I tried this command line and got “TRUE” - so does that maybe mean that it has worked better than it appeared…?
THANK YOU!


#7

I was also having no end of trouble trying to get stan working on a windows 10 machine last night. Was working a month or two ago, but either updates to stan or updates to windows broke things. I ended up having to use an older approach of installing Rtools manually and putting c:\Rtools\mingw_64\bin in my path to get it to find g++.


#8

I think it appeared to work.


#9

okay great thanks! I appreciate all the feedback - and will likely be back on here as soon as I run into my next snag… :)