# \#installation

**URL:** https://discourse.mc-stan.org/tag/installation/10.md?match_all_tags=true&page=1&tags%5B%5D=installation

[Latest](https://discourse.mc-stan.org/latest.md) · [Categories](https://discourse.mc-stan.org/categories.md) · [Tags](https://discourse.mc-stan.org/tags.md)

**Page:** 2

---

## [Problem installing cmdstan with R4.2 and RTools42](https://discourse.mc-stan.org/t/problem-installing-cmdstan-with-r4-2-and-rtools42/28846)

<div class="topic-metadata">

**Author:** [@Peter.Stewart](https://discourse.mc-stan.org/u/Peter.Stewart)\
**Replies:** 7\
**Last updated:** [July 12, 2023, 7:29am UTC](https://discourse.mc-stan.org/t/problem-installing-cmdstan-with-r4-2-and-rtools42/28846 "2023-07-12T07:29:59Z")

</div>

Hi everyone, I recently updated to R4.2.1 (and RTools42) , and I’m now encountering problems when trying to reinstall cmdstanr. When I tried to install cmdstan using the install\_cmdstan function in cmdstanr, I encounte…

---

## [New PyStan installation and ValueError: The JSON document has an improper structure](https://discourse.mc-stan.org/t/new-pystan-installation-and-valueerror-the-json-document-has-an-improper-structure/31779)

<div class="topic-metadata">

**Author:** [@gavi0065](https://discourse.mc-stan.org/u/gavi0065)\
**Replies:** 2\
**Last updated:** [June 20, 2023, 7:18pm UTC](https://discourse.mc-stan.org/t/new-pystan-installation-and-valueerror-the-json-document-has-an-improper-structure/31779 "2023-06-20T19:18:36Z")

</div>

Hi there, I’m just trying to get started with stan programming, but I keep running into pystan installation/stan.build issues. I’ve gone through the previous threads that seem to suggest a similar error, but nothing I’v…

---

## [Error running rstan example model](https://discourse.mc-stan.org/t/error-running-rstan-example-model/29892)

<div class="topic-metadata">

**Author:** [@AMR](https://discourse.mc-stan.org/u/AMR)\
**Replies:** 6\
**Last updated:** [December 28, 2022, 1:10pm UTC](https://discourse.mc-stan.org/t/error-running-rstan-example-model/29892 "2022-12-28T13:10:25Z")

</div>

I am new to rstan and have just installed it to the latest version of R and Rstudio on Windows 10. To verify the installation I ran the example model example(stan\_model, package = "rstan", run.dontrun = TRUE) giving …

---

## [Rstan segfaults on macOS ventura (13.4)](https://discourse.mc-stan.org/t/rstan-segfaults-on-macos-ventura-13-4/31547)

<div class="topic-metadata">

**Author:** [@JoFrhwld](https://discourse.mc-stan.org/u/JoFrhwld)\
**Replies:** 4\
**Last updated:** [June 5, 2023, 1:30am UTC](https://discourse.mc-stan.org/t/rstan-segfaults-on-macos-ventura-13-4/31547 "2023-06-05T01:30:42Z")

</div>

I’m trying to install and run rstan on macOS 13.4 with an M1. I think I’ve installed all dependencies and correctly configured ~/.R/Makevars, but when I try to run the example to test installation, I get a segfault. I’v…

---

## [Rstan 2.26 and cmdstanr .zip files?](https://discourse.mc-stan.org/t/rstan-2-26-and-cmdstanr-zip-files/31487)

<div class="topic-metadata">

**Author:** [@jd\_c](https://discourse.mc-stan.org/u/jd_c)\
**Replies:** 2\
**Last updated:** [May 25, 2023, 1:06pm UTC](https://discourse.mc-stan.org/t/rstan-2-26-and-cmdstanr-zip-files/31487 "2023-05-25T13:06:22Z")

</div>

Howdy, I am having a no luck installing the latest development version of rstan using this: install.packages("rstan", repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) on my work computer. It works fin…

---

## [Issue installing cmdstan from cmdstanr in windows](https://discourse.mc-stan.org/t/issue-installing-cmdstan-from-cmdstanr-in-windows/31324)

<div class="topic-metadata">

**Author:** [@Jgittens](https://discourse.mc-stan.org/u/Jgittens)\
**Replies:** 2\
**Last updated:** [May 24, 2023, 12:57pm UTC](https://discourse.mc-stan.org/t/issue-installing-cmdstan-from-cmdstanr-in-windows/31324 "2023-05-24T12:57:02Z")

</div>

I am getting an error message when attempting to install cmdstan from cmdstanr in windows. I originally thought it was an issue with spaces in my directory name but tried just installing to c:/test and same issue. Had t…

---

## [Likelihood finite but gradient NaN, problem with parameter transformations?](https://discourse.mc-stan.org/t/likelihood-finite-but-gradient-nan-problem-with-parameter-transformations/31430)

<div class="topic-metadata">

**Author:** [@chris1](https://discourse.mc-stan.org/u/chris1)\
**Replies:** 3\
**Last updated:** [May 23, 2023, 3:55am UTC](https://discourse.mc-stan.org/t/likelihood-finite-but-gradient-nan-problem-with-parameter-transformations/31430 "2023-05-23T03:55:45Z")

</div>

Hi everyone I’ve got yet another example of the gradients not being finite, but having a finite likelihood for the initial parameters. I’m reaching out for help because I’ve been trying to debug for days now! I have a v…

---

## [Error in compileCode(f, code, language = language, verbose = verbose)](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose/31444)

<div class="topic-metadata">

**Author:** [@cluke27](https://discourse.mc-stan.org/u/cluke27)\
**Replies:** 1\
**Last updated:** [May 18, 2023, 5:53pm UTC](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose/31444 "2023-05-18T17:53:50Z")

</div>

Hi all, I’ve run into an issue with my brms/RStan install on a Remote Desktop Connection I have set up. I have not run into this issue locally and am able to run brms/RStan fine. Below is my session info: \> sessionInfo…

---

## [Error installing cmdstan 2.32.1 with R4.3 Rtools43](https://discourse.mc-stan.org/t/error-installing-cmdstan-2-32-1-with-r4-3-rtools43/31330)

<div class="topic-metadata">

**Author:** [@parnamets](https://discourse.mc-stan.org/u/parnamets)\
**Replies:** 9\
**Last updated:** [May 12, 2023, 1:12pm UTC](https://discourse.mc-stan.org/t/error-installing-cmdstan-2-32-1-with-r4-3-rtools43/31330 "2023-05-12T13:12:13Z")

</div>

Hi, I have run into a problem installing Cmdstan 2.32.1 from cmdstanr, using R 4.3 and rtools43. I’ve reproduced it on two separate machines with identical results. I have tried rebuilding mingw (does not help). I can …

---

## [Error installing CmdStan, invalid conversion from 'const'](https://discourse.mc-stan.org/t/error-installing-cmdstan-invalid-conversion-from-const/31049)

<div class="topic-metadata">

**Author:** [@tomas.rossetti](https://discourse.mc-stan.org/u/tomas.rossetti)\
**Replies:** 25\
**Last updated:** [April 12, 2023, 6:57pm UTC](https://discourse.mc-stan.org/t/error-installing-cmdstan-invalid-conversion-from-const/31049 "2023-04-12T18:57:40Z")

</div>

I’m trying to install CmdStan but I can’t compile the Bernoulli example. The issue seems to be described in the following lines: stan/lib/stan\_math/lib/eigen\_3.4.0/Eigen/src/Core/Map.h:142:31: note: initializing argum…

---

## [Issues installing and running rstan in R on Windows](https://discourse.mc-stan.org/t/issues-installing-and-running-rstan-in-r-on-windows/31027)

<div class="topic-metadata">

**Author:** [@Jordan](https://discourse.mc-stan.org/u/Jordan)\
**Replies:** 10\
**Last updated:** [April 9, 2023, 9:24pm UTC](https://discourse.mc-stan.org/t/issues-installing-and-running-rstan-in-r-on-windows/31027 "2023-04-09T21:24:49Z")

</div>

Hi there, I’ve been having problems using R on a Windows computer that I haven’t been able to figure out just from browsing. I’m currently using Windows 10, and R vers. 4.2.2 When I install rstan directly and run the …

---

## [RStan fails to build example model](https://discourse.mc-stan.org/t/rstan-fails-to-build-example-model/27248)

<div class="topic-metadata">

**Author:** [@fornaeffe](https://discourse.mc-stan.org/u/fornaeffe)\
**Replies:** 2\
**Last updated:** [April 3, 2023, 10:54am UTC](https://discourse.mc-stan.org/t/rstan-fails-to-build-example-model/27248 "2023-04-03T10:54:51Z")

</div>

Hi, I succesfully used rstan with previous versions of R, Rtools and rstan (maybe R 4.1.2 and Rtools4, I don’t remember well). I updated R to R 4.2.0, and rtools to Rtools42; I removed all previous installations of rs…

---

## [Modeling failed Warnings: 'C:/Users/R-34~1.3/rtools40/usr/mingw\_/bin/g++' not found Errors: Multiple results for CXX14FLAGS found, something is wrong.FALSE](https://discourse.mc-stan.org/t/modeling-failed-warnings-c-users-r-34-1-3-rtools40-usr-mingw-bin-g-not-found-errors-multiple-results-for-cxx14flags-found-something-is-wrong-false/19154)

<div class="topic-metadata">

**Author:** [@ASaeed](https://discourse.mc-stan.org/u/ASaeed)\
**Replies:** 73\
**Last updated:** [March 15, 2023, 2:28pm UTC](https://discourse.mc-stan.org/t/modeling-failed-warnings-c-users-r-34-1-3-rtools40-usr-mingw-bin-g-not-found-errors-multiple-results-for-cxx14flags-found-something-is-wrong-false/19154 "2023-03-15T14:28:40Z")

</div>

Short summary of the problem: I have installed R and rstan on my laptop and I am running a stream metabolizer model . And I changed the default libPaths so I set things to install in the right directory. But I am still…

---

## [Cmdstanr fails to install on Mac Ventura with M2 - "bad CPU" !?](https://discourse.mc-stan.org/t/cmdstanr-fails-to-install-on-mac-ventura-with-m2-bad-cpu/30233)

<div class="topic-metadata">

**Author:** [@Al\_in\_Sweden](https://discourse.mc-stan.org/u/Al_in_Sweden)\
**Replies:** 2\
**Last updated:** [February 1, 2023, 7:43pm UTC](https://discourse.mc-stan.org/t/cmdstanr-fails-to-install-on-mac-ventura-with-m2-bad-cpu/30233 "2023-02-01T19:43:15Z")

</div>

Hello…I hope someone can help. I am trying to install cmdstanr for the first time on a new mac mini M2 via Rstudio. I am followed the steps outlined here: All looks good until I run the “mod ← cmdstan\_model(file)” co…

---

## [Brms installation problems on ubuntu 22.04.1 LTS](https://discourse.mc-stan.org/t/brms-installation-problems-on-ubuntu-22-04-1-lts/30084)

<div class="topic-metadata">

**Author:** [@cdaube](https://discourse.mc-stan.org/u/cdaube)\
**Replies:** 7\
**Last updated:** [January 27, 2023, 4:26pm UTC](https://discourse.mc-stan.org/t/brms-installation-problems-on-ubuntu-22-04-1-lts/30084 "2023-01-27T16:26:11Z")

</div>

Dear brms users and creators, I would be very thankful if you could point me to any potentially helpful thoughts about the following: Short summary of the problem: I have tried to install brms on my Ubuntu machine. It…

---

## [Rstanarm installation failure on R 3.6.2, Debian 9](https://discourse.mc-stan.org/t/rstanarm-installation-failure-on-r-3-6-2-debian-9/12756)

<div class="topic-metadata">

**Author:** [@Takao\_Noguchi](https://discourse.mc-stan.org/u/Takao_Noguchi)\
**Replies:** 9\
**Last updated:** [September 14, 2020, 1:28pm UTC](https://discourse.mc-stan.org/t/rstanarm-installation-failure-on-r-3-6-2-debian-9/12756 "2020-09-14T13:28:14Z")

</div>

Hi, I am trying to install rstanarm, with the following command: install.packages("rstanarm") The installation command results in the following error: \*\* testing if installed package can be loaded from temporary loc…

---

## [Error in compileCode(f, code, language = language, verbose = verbose) : C:/rtools42/mingw64/bin/../lib/gcc/x86\_64-w64-mingw32/8.3.0/../../../../](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-c-rtools42-mingw64-bin-lib-gcc-x86-64-w64-mingw32-8-3-0/30096)

<div class="topic-metadata">

**Author:** [@Kasper\_Pedersen](https://discourse.mc-stan.org/u/Kasper_Pedersen)\
**Replies:** 1\
**Last updated:** [January 18, 2023, 2:36pm UTC](https://discourse.mc-stan.org/t/error-in-compilecode-f-code-language-language-verbose-verbose-c-rtools42-mingw64-bin-lib-gcc-x86-64-w64-mingw32-8-3-0/30096 "2023-01-18T14:36:29Z")

</div>

When i try to follow the instructions for installation of rstan i keep getting this error when i run example(stan\_model, package = “rstan”, run.dontrun = TRUE). I have tried restarting r and pass in install.packages(c(…

---

## [Cannot install Rstan for R 3.6.3](https://discourse.mc-stan.org/t/cannot-install-rstan-for-r-3-6-3/30027)

<div class="topic-metadata">

**Author:** [@BThomas](https://discourse.mc-stan.org/u/BThomas)\
**Replies:** 1\
**Last updated:** [January 12, 2023, 5:06pm UTC](https://discourse.mc-stan.org/t/cannot-install-rstan-for-r-3-6-3/30027 "2023-01-12T17:06:29Z")

</div>

I am running into issues trying to install Rstan for R 3.6.3 and have scoured the forums but none of the proposed solutions are working for me. System Info: Windows 11 Home R: 3.6.3 Rstudio 2022.07.1 RTools 3.5 I fo…

---

## [Override dependency on V8 or make V8 build on PowerPC Mac? (R 4.1.2)](https://discourse.mc-stan.org/t/override-dependency-on-v8-or-make-v8-build-on-powerpc-mac-r-4-1-2/25432)

<div class="topic-metadata">

**Author:** [@barracuda](https://discourse.mc-stan.org/u/barracuda)\
**Replies:** 14\
**Last updated:** [November 17, 2022, 12:06pm UTC](https://discourse.mc-stan.org/t/override-dependency-on-v8-or-make-v8-build-on-powerpc-mac-r-4-1-2/25432 "2022-11-17T12:06:20Z")

</div>

I am 1 dependency away from building (or trying to at least) rstan on a PowerPC Mac. StanHeaders and others have been finally built, thanks to helpful suggestions here and on Git. The remaining obstacle is V8 dependency,…

---

## [Eight schools example fails after new rstan install](https://discourse.mc-stan.org/t/eight-schools-example-fails-after-new-rstan-install/29473)

<div class="topic-metadata">

**Author:** [@my\_rstanarm\_username](https://discourse.mc-stan.org/u/my_rstanarm_username)\
**Replies:** 3\
**Last updated:** [November 14, 2022, 9:29pm UTC](https://discourse.mc-stan.org/t/eight-schools-example-fails-after-new-rstan-install/29473 "2022-11-14T21:29:19Z")

</div>

After a fresh install of rstan with R version 4.2.1 RTools 4.2 Rstudio version 2022.02.0 Build 443 install.packages("StanHeaders", repos = c("https://mc-stan.org/r-packages/", getOption("repos"))) install.packages("r…

---

## [Brms and rstan compilation error](https://discourse.mc-stan.org/t/brms-and-rstan-compilation-error/29203)

<div class="topic-metadata">

**Author:** [@Ruben222](https://discourse.mc-stan.org/u/Ruben222)\
**Replies:** 2\
**Last updated:** [October 20, 2022, 1:28pm UTC](https://discourse.mc-stan.org/t/brms-and-rstan-compilation-error/29203 "2022-10-20T13:28:17Z")

</div>

Hello. I was trying to run a very simple model in brms. However, it keeps throwing errors. brm(data = Concern\_data, Response ~ 1 , iter = 4000, warmup = 1000, chains = 4,…

---

## [Problem with cmdstan unpacking](https://discourse.mc-stan.org/t/problem-with-cmdstan-unpacking/29041)

<div class="topic-metadata">

**Author:** [@Joel\_Olausson](https://discourse.mc-stan.org/u/Joel_Olausson)\
**Replies:** 5\
**Last updated:** [October 6, 2022, 12:51pm UTC](https://discourse.mc-stan.org/t/problem-with-cmdstan-unpacking/29041 "2022-10-06T12:51:45Z")

</div>

Hello, im having some trouble with my cmdstan installation. When it is supposed to unpack the tar file when using cmdstanr::install\_cmdstan(overwrite=TRUE) i get the error: /usr/bin/tar: Cannot connect to C: resolve fail…

---

## [Devtools::build(binary = TRUE) problem with a package using rstan](https://discourse.mc-stan.org/t/devtools-build-binary-true-problem-with-a-package-using-rstan/28870)

<div class="topic-metadata">

**Author:** [@paul](https://discourse.mc-stan.org/u/paul)\
**Replies:** 0\
**Last updated:** [September 16, 2022, 2:44pm UTC](https://discourse.mc-stan.org/t/devtools-build-binary-true-problem-with-a-package-using-rstan/28870 "2022-09-16T14:44:50Z")

</div>

Hello I am trying to develop a package for a model using Stan that can be distributed to users as a binary on Windows to avoid having to install Rtools. The package is here: As well as the rstan sampler and optimizer…

---

## [Rstanarm: CRAN vs Development version installation issues](https://discourse.mc-stan.org/t/rstanarm-cran-vs-development-version-installation-issues/14399)

<div class="topic-metadata">

**Author:** [@JFG](https://discourse.mc-stan.org/u/JFG)\
**Replies:** 74\
**Last updated:** [August 11, 2022, 10:40pm UTC](https://discourse.mc-stan.org/t/rstanarm-cran-vs-development-version-installation-issues/14399 "2022-08-11T22:40:48Z")

</div>

I am new to rstan and rstanarm. I have been able to successfully follow: https://github.com/stan-dev/rstan/wiki/RStan-Getting-Started to get started. I have installed rstan and rstanarm (Cran) and have been able to su…

---

## [Error installing Stan on Windows 10, R 3.6.3](https://discourse.mc-stan.org/t/error-installing-stan-on-windows-10-r-3-6-3/28223)

<div class="topic-metadata">

**Author:** [@johnsnow2022](https://discourse.mc-stan.org/u/johnsnow2022)\
**Replies:** 3\
**Last updated:** [August 10, 2022, 9:22pm UTC](https://discourse.mc-stan.org/t/error-installing-stan-on-windows-10-r-3-6-3/28223 "2022-08-10T21:22:14Z")

</div>

I would like to install rstan package in R3.6.3 on Windows 10. I have tried so many times. Since I have to use some old packages which only work in R3.6, I cannot switch to R4.0. However, I could install and use rstan in…

---

## [Installing rstan with miniconda environment](https://discourse.mc-stan.org/t/installing-rstan-with-miniconda-environment/28260)

<div class="topic-metadata">

**Author:** [@Damon\_C\_Roberts](https://discourse.mc-stan.org/u/Damon_C_Roberts)\
**Replies:** 1\
**Last updated:** [August 9, 2022, 4:35pm UTC](https://discourse.mc-stan.org/t/installing-rstan-with-miniconda-environment/28260 "2022-08-09T16:35:21Z")

</div>

I followed the installation instructions that you’ve provided but am still having problems getting it to work. I use R in a miniconda environment on windows. I installed R tools using the default where Rtools40 is locat…

---

## [Error installing rstanarm from github](https://discourse.mc-stan.org/t/error-installing-rstanarm-from-github/28138)

<div class="topic-metadata">

**Author:** [@mollymce](https://discourse.mc-stan.org/u/mollymce)\
**Replies:** 0\
**Last updated:** [July 8, 2022, 2:13pm UTC](https://discourse.mc-stan.org/t/error-installing-rstanarm-from-github/28138 "2022-07-08T14:13:55Z")

</div>

It seems like the stan\_surv function is not included in the latest rstanarm binary, so I’m trying to install the feature/survival branch from github. The installation is failing, and I’m not sure what else to try. I’m u…

---

## [R crashes when trying out example(stan\_model...)](https://discourse.mc-stan.org/t/r-crashes-when-trying-out-example-stan-model/27948)

<div class="topic-metadata">

**Author:** [@golde](https://discourse.mc-stan.org/u/golde)\
**Replies:** 11\
**Last updated:** [July 5, 2022, 7:45pm UTC](https://discourse.mc-stan.org/t/r-crashes-when-trying-out-example-stan-model/27948 "2022-07-05T19:45:12Z")

</div>

Hello, I have tried to install and use rstan on my Windows 10 computer. I am using RStudio Version 1.4.1106 with R version 4.1.0. I was following the description on GitHub (RStan Getting Started · stan-dev/rstan Wiki · …

---

## [Cmdstanr installation problem](https://discourse.mc-stan.org/t/cmdstanr-installation-problem/28052)

<div class="topic-metadata">

**Author:** [@mmabaei](https://discourse.mc-stan.org/u/mmabaei)\
**Replies:** 29\
**Last updated:** [July 3, 2022, 5:28pm UTC](https://discourse.mc-stan.org/t/cmdstanr-installation-problem/28052 "2022-07-03T17:28:31Z")

</div>

Hi there, I am trying to install cmdstanr in my rstudio but everytime it get me that your path is not identified. here are the errors: \> library(cmdstanr) This is cmdstanr version 0.5.2.1 - CmdStanR documentation and…

---

## [Error when running brm model](https://discourse.mc-stan.org/t/error-when-running-brm-model/27951)

<div class="topic-metadata">

**Author:** [@smcelroy1287](https://discourse.mc-stan.org/u/smcelroy1287)\
**Replies:** 1\
**Last updated:** [June 29, 2022, 6:36am UTC](https://discourse.mc-stan.org/t/error-when-running-brm-model/27951 "2022-06-29T06:36:06Z")

</div>

I am new to stans and I can’t figure out what this error is telling me when I try and run a brm model. Version of R: 4.2 Rtools: 4.2 Error in compileCode(f, code, language = language, verbose = verbose) : C:\\rtools42…

[Previous page](https://discourse.mc-stan.org/tag/installation/10.md?match_all_tags=true&tags%5B%5D=installation)

[Next page](https://discourse.mc-stan.org/tag/installation/10.md?match_all_tags=true&page=2&tags%5B%5D=installation)
