# Running brm doesnt work on mac but runs on windows

**URL:** <https://discourse.mc-stan.org/t/running-brm-doesnt-work-on-mac-but-runs-on-windows/33320>\
**Category:** brms\
**Created:** [November 13, 2023, 6:55pm UTC](https://discourse.mc-stan.org/t/running-brm-doesnt-work-on-mac-but-runs-on-windows/33320 "2023-11-13T18:55:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jusschmi](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jusschmi](https://discourse.mc-stan.org/u/jusschmi)\
**Post date:** [November 13, 2023, 6:55pm UTC](https://discourse.mc-stan.org/t/running-brm-doesnt-work-on-mac-but-runs-on-windows/33320/1 "2023-11-13T18:55:51Z")

</div>

Hi all, I am new to brm() and wanted to use it to run a model for my analyses. I do get the following error-message as I call brm():  
Divergences:  
Stan model ‘anon\_model’ does not contain samples.  
Error in do.call(rbind, sampler\_params) : second argument must be a list

I m running the code on an M2 chip and sonoma as operating system. I installed the scode CLI and gfortran using the macrtools package.  
I then installed the required packages from source. My model runs on a windows system using rtools perfectly fine. But I get the error above.

```no-highlight
brm(
    formula,
    data = df1,
    family = cumulative("probit"),
    prior = prior_spec,
    chains = 4,
    iter = 4000,
    warmup = 1000,
    control = list(adapt_delta = 0.80, max_treedepth = 10),
    save_all_pars = TRUE,
    init = 0 , 
    sample_prior = TRUE,
    seed = 42,
    file = paste("model_fits", paste0(model_name, ".r"), sep = "/")
  )

```

- Operating System: macos 14.0

I am looking forward to any help on this. I think it is likely that my environment is not setup properly to run brm(). I will add more specific information if needed.

---

<div class="post-metadata">

**Author:** ![Ara\_Winter](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/ara_winter/32/4284_2.png) [@Ara\_Winter](https://discourse.mc-stan.org/u/Ara_Winter)\
**Post date:** [November 13, 2023, 9:35pm UTC](https://discourse.mc-stan.org/t/running-brm-doesnt-work-on-mac-but-runs-on-windows/33320/2 "2023-11-13T21:35:42Z")

</div>

Do you have xcode installed as well? I have not tried to run brms or Stan on the M series of chips without installing xcode first.
