Global library present despite Pixi R interpreter #11119
-
System details:Positron and OS details:Positron Version: 2026.01.0 build 85 Session details:R 4.5.2 Describe the issue:Now that there is experimental support for Pixi R interpreter discovery (#3724, amazing that this is done!), I would expect only to be able to use packages installed with Pixi, however I can still access global libraries which defeats the reproducibility gains of using Pixi with a separate R installation. Steps to reproduce the issue:
> .libPaths()
[1] "/Users/roaldarbol/Library/R/x86_64/4.5/library"
[2] "/Users/roaldarbol/Projects/Papers/Belay-Paper/.pixi/envs/default/lib/R/library"For example, in the above, I have only installed > library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, unionExpected or desired behavior:I would expect to only have access to the Pixi libraries. OtherI understand that this is not just as easy as this; what would we for example expect from |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 1 reply
-
|
As far as I can tell, this global library is not added by Positron. It is also present if you just run Pixi R in a plain terminal. Is this behavior something that should be changed upstream in Pixi? |
Beta Was this translation helpful? Give feedback.
-
|
You're right, I get the same thing actually. I wonder where the right place might be for this, whether it's simply a base R thing. When I simply start R with my Rig installation, I get the same order: ❯ which r
╭───┬─────────┬──────────────────┬──────────╮
│ # │ command │ path │ type │
├───┼─────────┼──────────────────┼──────────┤
│ 0 │ r │ /usr/local/bin/r │ external │
╰───┴─────────┴──────────────────┴──────────╯
Projects/tests/test-pixi-r via 🧚 v0.61.0
❯ r --version
R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
https://www.gnu.org/licenses/.
Projects/tests/test-pixi-r via 🧚 v0.61.0
❯ r
R version 4.5.2 (2025-10-31) -- "[Not] Part in a Rumble"
Copyright (C) 2025 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin20
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> .libPaths()
[1] "/Users/roaldarbol/Library/R/x86_64/4.5/library"
[2] "/Library/Frameworks/R.framework/Versions/4.5-x86_64/Resources/library"How do you deal with this with renv? In rpix, I also made functions to handle library paths, as have I previously done in a Pixi R template repository, see here. |
Beta Was this translation helpful? Give feedback.
-
|
@roaldarbol you might be interested in conda-ecosystem-user-package-isolation. It helps (it disables |
Beta Was this translation helpful? Give feedback.
-
|
Well, that was not on my potential issues bingo-card... it seems so backwards that it does this - and to be fair, it seems there was only a single person pushing back really, so I wonder if we could resurrect the PR (from 2018, that's crazy!)? Maybe with a bit of Posit and Prefix backing, it might finally make it through? Otherwise, could we simply make a (I also just saw your PR was mentioned on an earlier Pixi issue I made a while back (prefix-dev/pixi#587)). Personally, like you @jdblischak (I think), I'd expect it to "just work", so having to install an extra package simply to shield the environment seems very off to me. Not good UX. @wolfv Just FYI, as I know you're just as keen as I to get proper Pixi R support - in Positron and elsewhere. @jmcphers So this is not a Positron issue, but an issue affecting Positron. I guess you could convert this into a discussion, or keep the issue open so users who face this issue may find it (and the proposed patches) until a proper solution is found. |
Beta Was this translation helpful? Give feedback.
-
|
I'm going to close this since there's no change I think we should make on the Positron side, and convert it to a discussion as you suggest. |
Beta Was this translation helpful? Give feedback.
-
|
I'm happy to share this: You can now get a fully isolated R ( The recipe is really a heavily modified branch of the conda-forge feedstock, so changes in conda-forge |
Beta Was this translation helpful? Give feedback.
I'm happy to share this: You can now get a fully isolated R (
r-base) installation from thehttps://prefix.dev/isolated-rchannel!The recipe is really a heavily modified branch of the conda-forge feedstock, so changes in conda-forge
r-baseshould/will make it across to this build easily.