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

[Feature Request] Adding support for pixi package mangement tool #2798

Open
pluiez opened this issue Dec 3, 2024 · 0 comments
Open

[Feature Request] Adding support for pixi package mangement tool #2798

pluiez opened this issue Dec 3, 2024 · 0 comments

Comments

@pluiez
Copy link

pluiez commented Dec 3, 2024

Hi, recently I have been using pixi, I found that it could be a promising substituion for conda, here is its introduction:

pixi is a cross-platform, multi-language package manager and workflow tool built on the foundation of the conda ecosystem. It provides developers with an exceptional experience similar to popular package managers like cargo or yarn, but for any language.

It would be really great if p10k adds support for pixi.

pixi manages per-project conda environment automatically without explicit invocation of conda activate <env_name> and conda deactivate.

There are two use cases of switching environment

  1. Automatically switching by entering and leaving a directory

In the following project directory, I have already configured pixi to work properly, so pixi run <command> is actually using the project environment instead of the global anaconda environment:

~/repos/LiveBench on   main !2 ?4 ··························································································································································· ✘ INT took  4s  base at  03:10:49
❯  pixi run which python
/home/my/repos/LiveBench/.pixi/envs/default/bin/python

Here, p10k shows currently activated conda "base" env on the right of the prompt and pixi run which python shows it's pointing to env under project directory.

additionally, pixi is capable of managing multiple environments in one project directory. The default one is named default, the other can be dev/test and whatever you want.

Expected enhancement: display the folder name and activated env like "LiveBench:default"

  1. Manually activating

Under a pixi configured project directory, running pixi shell will activate the corresponding project env even if you leave the directory.

❯  pixi shell
 ~/repos/LiveBench on   main !2 ?4 ········································································································································································· ✔  base at  11:59:18
❯  which python
/home/my/repos/LiveBench/.pixi/envs/default/bin/python
 ~/repos/LiveBench on   main !2 ?4 ········································································································································································· ✔  base at  11:59:22
❯  cd ~/
 ~ ··········································································································································································································· ✔  base at  11:59:26
❯  which python
/home/my/repos/LiveBench/.pixi/envs/default/bin/python

Here you can see python still points to project env though we leaved the directory.

Expected enhancement: display the folder name and activate env like "LiveBench:default" by matching the output of which python.

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

1 participant