5.1 SetUp
Information about set up:
## R version 4.5.0 (2025-04-11)
## Platform: aarch64-apple-darwin20
## Running under: macOS Sequoia 15.5
##
## Locale: en_US.UTF-8 / en_US.UTF-8 / en_US.UTF-8 / C / en_US.UTF-8 / en_US.UTF-8
##
## Package version:
## bookdown_0.43 knitr_1.50 rmarkdown_2.29 xfun_0.52
##
## Pandoc version: 3.6.4
How to setup VSCode
About my system. This is what I’m using and how I set up my system. The average user I believe will need 24 GB of memory and a CPU greater than an intel i7 with 8+ cores for GPU and CPU. Storage is more of a preference as cloud storage is always available for purchase. For machine learning, it is recommended to have NVIDIA GPU. If you don’t have one, Google Colab is an alternative platform to these limits.
- MacBook Pro
- 48 GB
- 14-core CPU
- 20-core GPU
I run R in VSCode
Check for home updates and update if needed.
Install Homebrew
Update Homebrew
updated command line tools
Install mamba from the miniforge relseases and downloaded the latest arm64.sh
cd ~/Downloads
chmod +x Miniforge3-24.11.3-2-MacOSX-arm64
./Miniforge3-24.11.3-2-MacOSX-arm64
conda install mamba -n base -c conda-forge
mamba shell init -s zsh -p ~/miniforge3
export MAMBA_ROOT_PREFIX="$HOME/miniforge3"
export PATH="$HOME/miniforge3/bin:$PATH"
source ~/.zshrc
which mamba
mamba --version
Python
Git
VSCode
R and RStudio
brew install --cask r
R --version
brew install --cask rstudio
brew install --cask visual-studio-code
pipx
mamba install pipx -c conda-forge
pipx ensurepath
source ~/.zshrc
pipx --version
pipx install radian
export PATH="$HOME/.local/bin:$PATH"
source ~/.zshrc
verify if it works
install R extensions on VSCode and these packages
Weird behaviors:
mabma would return a weird wrapper when called:
to fix this I replaced the set up in .zshrc:
# >>> mamba initialize >>>
export MAMBA_EXE="/Users/ivy/miniforge3/bin/mamba"
export MAMBA_ROOT_PREFIX="/Users/ivy/miniforge3"
export PATH="/Users/ivy/miniforge3/bin:$PATH"
if [ -x "$MAMBA_EXE" ]; then
__mamba_setup="$("$MAMBA_EXE" shell hook --shell zsh --root-prefix "$MAMBA_ROOT_PREFIX" 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__mamba_setup"
else
echo "⚠️ Warning: Mamba shell hook failed to initialize"
alias mamba="$MAMBA_EXE"
fi
else
echo "⚠️ Warning: Mamba not found at $MAMBA_EXE"
alias mamba="$MAMBA_EXE"
fi
# <<< mamba initialize <<<
# reloaded
source ~/.zshrc
exec zsh # or just restart your terminal
# next checked output
echo $MAMBA_EXE
which mamba
type mamba
mamba --version
- $MAMBA_EXE → /Users/ivy/miniforge3/bin/mamba
- which mamba → /Users/ivy/miniforge3/bin/mamba
- type mamba → mamba is /Users/ivy/miniforge3/bin/mamba (no function)
and the wrapper was removed when i typed mamba