Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pixi environments? #1650

Open
royfrancis opened this issue Aug 22, 2024 · 8 comments
Open

Support for pixi environments? #1650

royfrancis opened this issue Aug 22, 2024 · 8 comments

Comments

@royfrancis
Copy link

Any plans to support pixi environments?

@Robinlovelace
Copy link

Was about to request the same feature, big 👍 to that, could save lots of time compared with reticulate::install_miniconda()

@n8layman
Copy link

+1

@t-kalinowski
Copy link
Member

Any plans to support pixi environments?

What features would be needed to support pixi environments?
Does pointing reticulate with env var RETICULATE_PYTHON at a pixi-managed python installation work?

@n8layman
Copy link

It would generally follow the roadmap of #1669. Specifically to get it to work currently I found that I needed to:

  1. Address the conda-meta/history file bug (currently I've resolved it via an activation script as suggested by John in invalid 'path' argument error when Reticulate looks for Python #1184)
  2. Point RETICULATE_PYTHON to the pixi python binary. Adding this RETICULATE_PYTHON="/Users/nathanlayman/homedir/repo/.pixi/envs/default/bin/python"to my .Renviron file worked for me.
  3. I'm also having trouble getting things working with radian, though I suspect that's a separate issue, as in Reticulate issue (tensorflow related) randy3k/radian#282

@t-kalinowski
Copy link
Member

You linked to the uv issue... does uv address your needs?

Note we have working uv support in the dev version of reticulate right now, see ?py_require(). https://rstudio.github.io/reticulate/dev/reference/py_require.html

@n8layman
Copy link

n8layman commented Feb 13, 2025

I think pixi actually uses uv under the hood! I did test on the dev version but still ended up needing the hacks above to get it to work.

@n8layman
Copy link

n8layman commented Feb 13, 2025

Another potential issue is that pixi, and uv I think, can manage multiple versions of Python within different environments. I've only tested the one here so far in the .pixi/envs/default environment. But it is possible to have multiple environments in a single project each using a different version of Python.

@pormr
Copy link

pormr commented Feb 20, 2025

It would generally follow the roadmap of #1669. Specifically to get it to work currently I found that I needed to:

  1. Address the conda-meta/history file bug (currently I've resolved it via an activation script as suggested by John in invalid 'path' argument error when Reticulate looks for Python #1184)
  2. Point RETICULATE_PYTHON to the pixi python binary. Adding this RETICULATE_PYTHON="/Users/nathanlayman/homedir/repo/.pixi/envs/default/bin/python"to my .Renviron file worked for me.
  3. I'm also having trouble getting things working with radian, though I suspect that's a separate issue, as in Reticulate issue (tensorflow related) randy3k/radian#282

Modifying the conda-meta/history file alone would suffice to make pixi compatible in my use case.

echo -n "# cmd: $CONDA_PREFIX/bin/conda" > $CONDA_PREFIX/conda-meta/history

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants