# Workarounds for current Rstan Windows issues

**URL:** <https://discourse.mc-stan.org/t/workarounds-for-current-rstan-windows-issues/17389>\
**Category:** RStan\
**Tags:** windows\
**Created:** [August 12, 2020, 9:35am UTC](https://discourse.mc-stan.org/t/workarounds-for-current-rstan-windows-issues/17389 "2020-08-12T09:35:47Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [August 12, 2020, 12:22pm UTC](https://discourse.mc-stan.org/t/workarounds-for-current-rstan-windows-issues/17389/2 "2020-08-12T12:22:46Z")

</div>

The quick advice to avoid many of the RStan Windows issues:

- do not install RTools in a path with spaces. If possible, install in the default location (C:/Rtools40)
- place your R package library in a path without spaces
- if you are using R 4.0, make sure to install RTools 4.0 and run

```
writeLines('PATH="${RTOOLS40_HOME}\\usr\\bin;${PATH}"', con = "~/.Renviron")

```

after installation (and then restart R). This is suggested in [RTools instructions](https://cran.r-project.org/bin/windows/Rtools/#putting-rtools-on-the-path) as well.

@bgoodri compilation not working if RTools is installed in a path with spaces and brackets is an R issue. Does it make sense to report that, given that its a general R issue? And where does one report that if yes?

---

_[View the full topic](https://discourse.mc-stan.org/t/workarounds-for-current-rstan-windows-issues/17389)._
