stan-dev / pystan

PyStan, a Python interface to Stan, a platform for statistical modeling. Documentation: https://pystan.readthedocs.io
ISC License
342 stars 59 forks source link

M1 Mac Support #364

Closed 8one6 closed 1 year ago

8one6 commented 2 years ago

Hi, is there currently any support at all for M1 mac? If not, is there any plan to add that support?

ahartikainen commented 2 years ago

https://github.com/actions/runner-images/issues/2187

conda might support it already.

8one6 commented 2 years ago

Thanks for that nudge. I found something in a previous Issue note about suggesting to install httpstan (from source). That worked for me! I'd suggest maybe adding something to the install instructions saying that M1 mac installs (on the ARM architecture) work fine with this workaround? Very disheartening to hear it wouldn't be possible (based on the official docs) but very exciting to see it actually works! Also, worth mentioning the ASyncio workaround for Jupyter notebooks in the official docs?

riddell-stan commented 2 years ago

M1 users should be fine if they build from source right now. They do need to follow the instructions in the docs.

We would very much like to build wheels for other platforms (M1, risc-v, etc) or, at least, allow automatic building from source (i.e., a source distribution that pip can work with).

We could do this today with scikit-build if an experienced cmake user would volunteer to make the changes here needed for httpstan to use cmake (rather than make).

8one6 commented 2 years ago

At the very least, maybe point that out in the docs? That installing from source should work on M1? Seeing that your platform is unsupported is a real downer!

ghost commented 2 years ago

Is there instructions on how to build from source? I'm facing the issue on an M1 Mac

riddell-stan commented 2 years ago

First install httpstan from source, https://httpstan.readthedocs.io/en/latest/installation.html

Then you can pip install pystan (which is pure Python).

On Thu, 22 Sep 2022, at 04:30, Chaoran Yu wrote:

Is there instructions on how to build from source? I'm facing the issue on an M1 Mac

— Reply to this email directly, view it on GitHubhttps://github.com/stan-dev/pystan/issues/364#issuecomment-1254512470, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AJQUBVQY7UYH3VCCDA4M5ODV7POFZANCNFSM576VLHIQ. You are receiving this because you commented.Message ID: @.***>

f0rodo commented 1 year ago

I did the install from source but I can't seem to import?

riddell-stan commented 1 year ago

Let's take this to the forum: https://discourse.mc-stan.org/ That's the right place for installation issues.

I'm going to close this for now since it's not really a bug and M1 support already exists. M1 wheels will emerge eventually -- no ETA, alas.