Problem in installing psyh library

Hello community,

I am trying to install psych package in R-studio. I have R version 4.1. there is an error:
ERROR: dependency ‘mnormt’ is not available for package ‘psych’

then I tried to install "mnormt" and I got
ERROR: dependency ‘tmvnsim’ is not available for package ‘mnormt’

I am stuck here. Please share your help. Thanks !

And what happens when you try to install tmvnsim?
You need to follow this path until you reach the root cause

Similar error! "installation of package ‘tmvnsim’ had non-zero exit status"

That is just the result of the process but you are not showing the actual error message, please post the complete output message you get.

install.packages(“mnormt")
install.packages("psych")
library(mnormt)
library(psych)

or reset R

or use internet conexion without proxy

Don`t forget commas ""

The OP already stated that there is a problem installing mnormt

clang-12: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [/Users/XXX/opt/anaconda3/envs/renv/lib/R/share/make/shlib.mk:6: tmvnsim.dylib] Error 1
ERROR: compilation failed for package ‘tmvnsim’

Installing packages from CRAN on a conda environment is not straightforward, I honestly have no idea how to make it work and there is not much information on the internet about this topic.

When dealing with conda environments it is better to install packages with conda commands but this restrics access to some package versions so if you don't absolutely need to use a conda environment I strongly recommend you to use a stand alone R environment.

Do you mean to use a different R-studio non-dependent to conda , or standalone R environment? I like to work in R-studio because of its user-friendly interface.

I just mean do not use Anaconda for R if you don't need to. RStudio is not officially supported trough Anaconda anyways so if you like working with it, you would be better off with a stand alone installation.