← Back to list

Apple Silicon: R, VS code and Quarto

This blog post focuses on setting up Visual Studio Code (VS Code) for R programming on MacBooks with Apple Silicon chips (M1, M2, etc.). If…

Jake Jing · 2025-06-19 13:22 · 0 claps · 3.0 min read paywalled
#vscode #quarto #apple-silicon #r-markdown #r-programming
Open on Medium ↗
Wiki topics: 💻 · Programming ⏱️ · Productivity

Apple Silicon: R, VS code and Quarto

This blog post focuses on setting up Visual Studio Code (VS Code) for R programming on MacBooks with Apple Silicon chips (M1, M2, etc.). If you’re using a different operating system, please refer to this blog post for a more comprehensive guide on using **R and Quarto Markdown Notebooks in VS Code. I’ll also assume that you’re interested in working with R Markdown or Quarto** notebooks within the VS Code environment.

The following softwares need to be updated to a native ARM64 version for better compatibility: R, VS Code, Fish shell, Zsh, Homebrew, and Radian.

1. Install the latest arm64 version of R

You can install the latest **R-4.5.1-arm64.pkg for macOS 11 (Big Sur) or later to replace any existing Intel version. If you have RStudio** installed, it will automatically detect and link to the new native ARM64 version of R.

2. Install the latest version of vscode for Apple silicon

To ensure full compatibility with your ARM64 version of R, you should also install the **VS Code for Apple Silicon**. In my earlier blog, I used the Intel version of VS Code, which runs through Rosetta — Apple’s translation layer that allows Intel-based apps to run on Apple Silicon (not recommended)

3. Install arm64 Homebrew

Next, you’ll need to install the ARM64 version of Homebrew and replace any existing Intel version. You can do this by running the following commands in the Zsh shell.

# 1 launch the arm64 zsh shell
exec arch -arm64 zsh -l
uname -m # should show: arm64

# 2 install arm64 homebrew and replace the x86_64 version
arch -arm64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" 

# (1) backup the original x86_64 brew (optional but recommended)
sudo mv /usr/local/bin/brew /usr/local/bin/brew.x86_64.backup

# (2) Create symbolic link to arm64 brew
sudo ln -s /opt/homebrew/bin/brew /usr/local/bin/brew

# (3) Verify the link
ls -la /usr/local/bin/brew # should show: /usr/local/bin/brew -> /opt/homebrew/bin/brew

# (4) check brew version
brew config | grep -E "Ruby|CPU"
# Ruby path: /opt/homebrew/Library/Homebrew/vendor/portable-ruby/ - This is the arm64 Homebrew location
# CPU: octa-core 64-bit arm_firestorm_icestorm - This is the M1 chip architecture

4. Install fish shell with arm64 brew (optional)

I’m a big fan of Fish shell, so I also want to install its native ARM64 version. Now that Homebrew has been updated, installing Fish shell is straightforward.

# install arm64 fish shell
brew install fish

# remove the old intel fish shell
sudo mv /usr/local/bin/fish /usr/local/bin/fish.x86_64.backup

# create a new softlink for arm64 fish shell
sudo ln -s /opt/homebrew/bin/fish /usr/local/bin/fish

# check the softlink
ls -la /usr/local/bin/fish

# check the version
file /opt/homebrew/bin/fish                                                        
# /opt/homebrew/bin/fish: Mach-O 64-bit executable arm64

5. Set arm64 as the default version for python

Since Fish shell is the default shell on my computer, I need to set the ARM64 version of Python as the default for both python3 and pip3. You can do this by adding the following code snippet to your alias.fish file.

# set default arm64 version for python3 and pip3
alias python3='arch -arm64 /Library/Frameworks/Python.framework/Versions/3.11/bin/python3'
alias pip3='arch -arm64 /Library/Frameworks/Python.framework/Versions/3.11/bin/pip3'

6. Install radian using pip3

Now that pip3 is configured to install only ARM64-compatible packages, you can directly install the ARM64 version of Radian.

# install radian
pip3 install radian

# check whether you can launch radian in termianl
radian
# should show: R version 4.5.1 (2025-06-13) -- "Great Square Root"
# Platform: aarch64-apple-darwin20 (64-bit)

7. Set the shell path (/usr/local/bin/fish) in vscode setting

set fish shell path in vs code

set fish shell path in vs code

8. Create a new R terminal in vs code

If everything is set up correctly, you should be able to launch a new R terminal from the VS Code Command Palette, running natively in the ARM64 environment.

Start a new R session

Start a new R session

Useful links:


메타데이터
post_id
b31e04982d2e
slug
apple-silicon-r-vs-code-and-quarto-b31e04982d2e
url
https://medium.com/@yingqijing/apple-silicon-r-vs-code-and-quarto-b31e04982d2e
canonical_url
https://medium.com/@yingqijing/apple-silicon-r-vs-code-and-quarto-b31e04982d2e
author_url
https://medium.com/@yingqijing
status
ok
fetched_at
2026-06-20 20:29:01