# Httpstan giving error

**URL:** <https://discourse.mc-stan.org/t/httpstan-giving-error/35257>\
**Category:** Modeling\
**Created:** [May 25, 2024, 10:23am UTC](https://discourse.mc-stan.org/t/httpstan-giving-error/35257 "2024-05-25T10:23:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nij\_PADARIYA](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/nij_padariya/32/18540_2.png) [@Nij\_PADARIYA](https://discourse.mc-stan.org/u/Nij_PADARIYA)\
**Post date:** [May 25, 2024, 10:23am UTC](https://discourse.mc-stan.org/t/httpstan-giving-error/35257/1 "2024-05-25T10:23:10Z")

</div>

base) nijpadariya@nijs-MacBook-Air httpstan-4.12.0 % python3 -m pip install dist/\*.whl

ERROR: httpstan-4.12.0-cp311-cp311-macosx\_14\_0\_arm64.whl is not a supported wheel on this platform.

Python 3.11.7  
conda 24.1.2  
macOs sonoma 14.5

---

<div class="post-metadata">

**Author:** ![mitzimorris](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/mitzimorris/32/29_2.png) [@mitzimorris](https://discourse.mc-stan.org/u/mitzimorris)\
**Post date:** [May 25, 2024, 3:53pm UTC](https://discourse.mc-stan.org/t/httpstan-giving-error/35257/2 "2024-05-25T15:53:10Z")

</div>

there’s another interface for Python users: CmdStanPy

for the new MacBook chips - M1, etc, the condo install might also be problematic; installation via pip works just fine: [Installation — CmdStanPy 1.2.2 documentation](https://mc-stan.org/cmdstanpy/installation.html#pypi-install-package-cmdstanpy)

example notebooks here: [CmdStanPy Examples — CmdStanPy 1.2.2 documentation](https://mc-stan.org/cmdstanpy/users-guide/examples.html)

---

<div class="post-metadata">

**Author:** ![Nij\_PADARIYA](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/nij_padariya/32/18540_2.png) [@Nij\_PADARIYA](https://discourse.mc-stan.org/u/Nij_PADARIYA)\
**Post date:** [May 26, 2024, 5:33am UTC](https://discourse.mc-stan.org/t/httpstan-giving-error/35257/3 "2024-05-26T05:33:53Z")

</div>

1. do i need to install httpstan by cloning the repo or it will work without it also?  
1.1) if yes then all the code do I have to write inside httpstan folder or any other directory?  
1.2) if httpstan require than what should be the location of directory
2. as I am running on Jupyter note book , which are the packages I need to install?
3. if I have previously written code in pystan2 than will it work or I need to change the syntex
4. import stan

schools\_code = “”"  
data {  
int\<lower=0\> J; // number of schools  
array[J] real y; // estimated treatment effects  
array[J] real\<lower=0\> sigma; // standard error of effect estimates  
}  
parameters {  
real mu; // population treatment effect  
real\<lower=0\> tau; // standard deviation in treatment effects  
vector[J] eta; // unscaled deviation from mu by school  
}  
transformed parameters {  
vector[J] theta = mu + tau \* eta; // school treatment effects  
}  
model {  
target += normal\_lpdf(eta | 0, 1); // prior log-density  
target += normal\_lpdf(y | theta, sigma); // log-likelihood  
}  
“”"

schools\_data = {“J”: 8,  
“y”: [28, 8, -3, 7, -1, 1, 18, 12],  
“sigma”: [15, 10, 16, 11, 9, 11, 10, 18]}

posterior = stan.build(schools\_code, data=schools\_data)  
fit = posterior.sample(num\_chains=4, num\_samples=1000)  
eta = fit[“eta”] # array with shape (8, 4000)  
df = fit.to\_frame() # pandas `DataFrame, requires pandas  
what change do in this code to run in mac m1
