forked from linux/documentation
update
This commit is contained in:
1 parent
0b954a4458
commit
cc3807ed04
1 file changed
+35
-3
@@ -1,13 +1,13 @@
|
||||
# Pixi Micromamba
|
||||
# Pixi / Micromamba
|
||||
|
||||
Micromamba and Pixi are package managers for conda/pip packages that can be used to easily create tailored Python environments. They are both drop-in replacements for conda and can be used in a similar way. They both have none of the licensing restrictions that Anaconda has and point to the free conda-forge channel by default.
|
||||
Micromamba and Pixi are package managers for conda (and pip) packages that can be used to easily create tailored Python environments. Micromamba is a drop-in replacements for conda and can be used in a similar way. Pixi has a slightly different usage pattern than micromamba. They both have none of the licensing restrictions that Anaconda has and point to the free and unproblematic conda-forge channel by default.
|
||||
|
||||
More details on these package managers can be found at:
|
||||
|
||||
- https://mamba.readthedocs.io/en/latest/
|
||||
- https://pixi.prefix.dev/latest/
|
||||
|
||||
As conda-forge is not accessible from within PSI we have a local caching mirror of the conda-forge channel available at https://conda.psi.ch. Please use this channel as the default channel for your conda environments at PSI!
|
||||
As conda-forge is not accessible from certain networks within PSI we have a local caching mirror of the conda-forge channel available at https://conda.psi.ch. Please use this channel as the default channel for your conda environments at PSI!
|
||||
|
||||
|
||||
## Installation
|
||||
@@ -82,3 +82,35 @@ micromamba run -n myenv mycommand
|
||||
```
|
||||
|
||||
### Pixi
|
||||
|
||||
Pixi has a slightly different usage pattern than micromamba. Pixi is a project-centric package manager like `cargo` (Rust) or `npm` (Node). You define a pixi.toml in your "project", and it manages environments per project.
|
||||
To initialize a new pixi project, you can run the following command in your project directory:
|
||||
|
||||
```bash
|
||||
pixi init my_workspace
|
||||
|
||||
[ ~]$ pixi init my_workspace
|
||||
✔ Created /home/abc/my_workspace/pixi.toml
|
||||
[ ~]$ ls -la
|
||||
total 0
|
||||
drwxr-xr-x. 2 abc unx-nogroup 63 Mar 11 15:21 my_workspace
|
||||
```
|
||||
|
||||
To add a dependency to your project, you can run:
|
||||
|
||||
```bash
|
||||
cd my_workspace
|
||||
pixi add numpy
|
||||
```
|
||||
|
||||
Activate the environment for this project with:
|
||||
|
||||
```bash
|
||||
pixi shell
|
||||
```
|
||||
|
||||
To leave the shell simply exit it with `exit` or `Ctrl+D`. You can also run a single command in the project environment without activating the shell with:
|
||||
|
||||
```bash
|
||||
pixi run mycommand
|
||||
```
|
||||
Reference in new issue
Block a user