MacOS: Package compilation fails in renv project, but succeeds outside renv

43 views Asked by At

I've cloned an Rproject that uses renv and it is failing to restore a package (cluster) due to not locating gcc and gfortran.

I've done diagnostics and have found that in Rstudio with the renv project loaded, Sys.which("gfortran") gives different results than outside of an renv project.

Outside renv: "/opt/homebrew/bin/gfortran" (which is correct, and matches the location when I check which gfortran in terminal. Inside the renv project, I get an empty string: ""

How is renv able to affect my system paths like this? Per the help for Sys.which(), "This is an interface to the system command which". Or where in the Rproj/renv settings are paths set that overrule system paths?

0

There are 0 answers