Open roaldarbol opened 1 month ago
Something might have broken in my system, I have the same issue in RStudio now...
It seems that using Positron pushed the system-wide library in front of the project-based library. That persisted when I went back to RStudio. I removed it again with .libPaths(.libPaths()[2])
. I think it was because it's not possible to open a project from the command line (#4049), then opening Positron uses a global R installation, and the library carried over and "superseded" the project library, when changing into a project even though the project had environment variables to set the libraries.
When I open RStudio, R.home()
points to the pixi installation, whereas when I run R.home()
in Positron, it points to the system-wide installation. So I guess Positron is not able to use a conda R installation (I knew the discovery didn't work yet, but I somehow imagined that if RStudio picked up the installation on start-up, the Positron would too)
Yes, I think this is related to #3724 where Positron does not know about Pixi R interpreters at all as of today. Thanks for the report!
Positron Version:
Version:
Steps to reproduce the issue:
The issue is that trying to load or use libraries that are located in a
.pixi
folder. This works just fine in RStudio.pixi exec copier copy gh:roaldarbol/r-template test-repo
cd test-repo
pixi add r-dplyr
)pixi run open -a positron
)test-repo
project folder.libPaths()
library
command can see the libraries - runlibrary()
library(dplyr)
- see errorError in library.dynam(lib, package, package.lib) : shared object ‘rlang.so’ not found
dplyr::filter()
Error: 'catch_cnd' is not an exported object from 'namespace:rlang'
What did you expect to happen?
I expected the library to load.
Were there any error messages in the Output panel or Developer Tools console?
Nothing suspocious in the Developer Tools Console (except that the logo doesn't load - but that's unrelated):
PS
Could we consider adding a test for R+conda too in https://github.com/posit-dev/positron/issues/3879?