macos – Failed to install any R packages in my conda virtual environment

I got my new computer (Mac Pro M1) lately but I am not quite familiar with the MacOS system…

I enjoy using VSCode so I configured it with R language. I created an virtual environment with commands:

conda create -n R python=3.8
conda activate R
conda install -c conda-forge r-base=4.1.2
conda install -c conda-forge r-languageserver

and configured everything following this website. Everything goes fine when I run R language except for installing R packages. Here is a screenshot of my problem.

screenshot of my VSCode

I can only install packages on R.app:

screenshot of R.app

Can anyone help me? Thanks so much in advance!!!

I really want to get everything ready for coding in R language with VSCode!!! How to solve it? It seems not a problem of permission?

Privacy & Security Settings

Updated infomation here:

Below are some screenshots showing what are in my R conda environment:
screenshot_1 of Finder
screenshot_2 of Finder

Also, the paths of R and Radian are added to settings of VSCode:
r.rpath
r.rterm

Read more here: Source link