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! :)
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.
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.
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++.
Thanks, Ben. With these removed, I get the following behaviors:
pkgbuild::has_build_tools(debug = TRUE) still fails
pkgbuild::has_rtools(debug = TRUE) returns the following
Scanning R CMD config CC...
cc_path:
'.exe' does not exist
Scanning path...
Scanning registry...
Found C:/RBuildTools/3.5 for 3.5
VERSION.txt
Rtools version 3.5.0.4
[1] TRUE
Building packages from source fails as well, for example
The Stack Overflow discussions seem to indicate that there might be an interaction with my organization’s anti-virus software. However, others in my organization are able to build packages from source and compile C++ code, so I’m not sure what’s going on.
I’ll try the previous version of R first, then try adding C:/RBuildTools back into the path, then as Charles has done, go back to C:/Rtools and put that in the path.