M1 arm-based Macs, RStudio, and RStan
Apple M1 環境で,RStudio で RStanを動かすまで.
-
R for macOS Developers から,arm64 で動く R を見つける.表の下に
Important: The big-sur builds are compatible with the M1 arm-based Macs only. Intel Macs are supported by the high-sierra build which works on any macOS >=10.13 including Big Sur.
とある.2021年7月21日時点では,OS big-sur で arm64 対応のものを選ぶとうまくいった.
-
RStudio daily builds から,最新テスト版の RStudio を入手.安定版ではないので自己責任で.
- RStudioを起動する(RとRStudioが上記以外ではここでつまづいた).
- 次を実行.
Sys.setenv(DOWNLOAD_STATIC_LIBV8 = 1) # only necessary for Linux without the nodejs library / headers install.packages("rstan", repos = "https://cloud.r-project.org/", dependencies = TRUE)
これでうまくいった.
参考