-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RStan not compatible with some Windows installations #54
Comments
Okay, I will see about using something like MCMCglmm or jags for that appendix in the short term. In the long term, I think it would be a disservice to readers to introduce them to those less flexible approaches in contrast to something like brm or rstanarm, which are built on top of Stan. The more flexible approaches are half the draw of Bayesian analysis. When we do the Bayesian exemplar we will probably want to revisit this. Looking at the bug there, it sounds like it may not be hardcoded paths, but path environment variables set improperly and/or paths with certain properties that rstan doesn't play well with (like ones with spaces and whatnot). Did you try installing rtools to c:\Rtools? I've had RStan installation issues before where installing to c:\Rtools fixed it, plus making sure I followed the steps on the rstan wiki to the letter. Sorry you've had to deal with this. I have half a mind to open an issue on their github called something like make rstan install correctly via install.packages("rstan") and note how the cumbersome installation loses them potential users. Probably there is a more diplomatic route. |
Also, looking at the stan instructions wiki (https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Windows), I see that this line might be incorrect if rtools is installed somewhere else: cat('Sys.setenv(BINPREF = "C:/Rtools/mingw_$(WIN)/bin/")',
file = file.path(Sys.getenv("HOME"), ".Rprofile"),
sep = "\n", append = TRUE) But the instructions do not make that clear. @steveharoz Did you try adjusting the path when you ran that code snippet to point to wherever you had installed rtools when you went through the instructions? If that's the culprit, I'll file an issue with the rstan folks pointing it out. |
E.g. from my previous comment, what is the output of this? system('where make') Or this? system('where make', intern = TRUE) %>%
strsplit("\\\\") %>%
unlist() %>%
`[`(c(-length(.) + 1, -length(.))) %>%
paste0(collapse = .Platform$file.sep) %>%
file.path("mingw_$(WIN)", "bin") |
Those both show the correct path. What cued me that something's really messed up is that Unfortunately, I can't install rtools to C for now. I'll be getting a new machine later this summer that I won't give a complicated setup. |
@steveharoz any update on this in the intervening time? I gather from that twitter conversation on Richard McElreath's book that you got Stan working. If that's the case I am leaning towards closing this. In the end stan and several packages built on it (notable rstanarm and brms) are becoming pretty popular, so I'd rather use it if possible in the Bayesian examples. |
This bug explains why I've been having so much trouble. Paths are apparently hard coded into the source code.
Since RStan can run into "but it works on my machine" problems, I don't think it's appropriate to use in a general purpose exemplar. It looks like it's only needed for one or two functions, so let's look into alternative libraries.
The text was updated successfully, but these errors were encountered: