positron
positron copied to clipboard
Automatic discovery of Pixi R interpreters
On top of python interpreters from conda/mamba and global R installations (e.g. with rig), they can both be installed with pixi to pin versions within a single project - incredibly useful when it comes to reproducibility.
So this feature request is for the automatic discovery of interpreters living inside a .pixi folder inside the opened project/folder. Note, that this has just been implemented for VS Code (for Python only), but does not work in Positron. Maybe it can be patched, or there's possibly help to find in that PR. In any case it would also need to be implemented for R interpreter.
That is great to see, never came across pixi but seems like a great way to manage environments. I'd also like to flag micromamba, the most efficient way to set-up and configure Python envs I've come across. No built-in support in VS Code but there's a good extension: https://marketplace.visualstudio.com/items?itemName=corker.vscode-micromamba
Would Pixi supercede the need for micromamba support @roaldarbol? You've saved me opening a feature request if so!
Also see https://github.com/prefix-dev/pixi/issues/1543 by the author of the original post.
@Robinlovelace It will! So the guys at prefix are the same folks behind mamba, and pixi is their "new" flagship - mamba will of course still be supported as I understand it. I use pixi now with all my projects, and we're just laying final touches on the last missing features to make it the option for R too - I currently have some nice mixed R/Python projects managed in the same environment, fully reproducible and IDE-independent. 😊
Very cool, keep up the great work!
Thank you for the info! Since we're currently using a fork of the vscode-python extension, the new pixi locator should just work once we've merged the latest release from upstream 🤞
@seeM That sounds great! How about discovery of R installation? Since it's also possible to download R from conda-forge, that can also live in .pixi - will that also be discoverable then, or will that require extra modifications on the Positron side?
And just to think ahead, once if Julia gets better support (https://github.com/posit-dev/positron/issues/3679) - and since Julia is also on conda-forge - could that become discoverable too. :-)
This may not be the best place for this question but the above comms makes me wonder: is there a way to default to a system installation? That could reduce bandwidth and HD resources of installing software multiple times on different environments. Or would you just not use pixi when you want to use system installation?
There is, you can pixi global install <package>. And good that you mentioned it, just opened https://github.com/posit-dev/positron/issues/3767, requesting Positron on conda-forge to allow a global installation of it.
For more pixi-related questions, I recommend checking out their documentation and joining their Discord - super helpful and responsive - it's a great community. :-)
@seeM That sounds great! How about discovery of R installation? Since it's also possible to download R from conda-forge, that can also live in
.pixi- will that also be discoverable then, or will that require extra modifications on the Positron side?
It would not affect R discovery, since that is a totally separate extension with its own machinery at this point.
Which extension is that? And I guess that is then the crux of this issue. :-)
Let's use this feature to track interest in supporting Pixi interpreters for R. Thanks! 🙌
@jennybc pointed me to this issue that seems related: https://github.com/posit-dev/positron/issues/2235
The discovery of Python pixi interpreters has just been released in the vscode-python extension.
This is great to see! Any chance of Positron using that extension or will it be a case of developing parallel functionality 'in-house', I wonder.
They already do - so as soon as the new release gets merged here, it should work. https://github.com/posit-dev/positron/issues/3724#issuecomment-2199892118
Thank you for the info! Since we're currently using a fork of the vscode-python extension, the new pixi locator should just work once we've merged the latest release from upstream 🤞
@roaldarbol is correct! The latest vscode-python release is a bit more complicated than usual (they've reimplemented environment discovery in Rust, which means we have to get the Rust toolchain + build setup properly too – also means much faster discovery! 🎉), so this update will take us a little longer than usual to merge.
@roaldarbol is correct! The latest vscode-python release is a bit more complicated than usual (they've reimplemented environment discovery in Rust, which means we have to get the Rust toolchain + build setup properly too – also means much faster discovery! 🎉), so this update will take us a little longer than usual to merge.
That would be great for Positron because for me its biggest issue at the moment is the abnormal long time (several minutes) it takes to discover interpreters and connect to the selected one...
PS: pixi is really awesome, it is finally solving Python package management nightmare.
@GitHunter0 We expect that long discovery time to only happen the first time you open a folder. Once you choose an interpreter in a workspace, it "remembers" and will immediately start that interpreter when you re-open the workspace in the future. Also, if a certain interpreter has been discovered, you can choose it right away; you don't have to wait for all interpreters to be discovered to start one that you want. We do have further improvements planned for interpreter discovery, but if today any of what I described isn't working for you, we would love a report! 🙌
@roaldarbol is correct! The latest vscode-python release is a bit more complicated than usual (they've reimplemented environment discovery in Rust, which means we have to get the Rust toolchain + build setup properly too – also means much faster discovery! 🎉), so this update will take us a little longer than usual to merge.
Just FYI for Pythonistas: Since this issue no longer tracks the Python installation, I think it went under the radar - but Positron does now discover Pixi Python installations. 🚀