Pixi#
Pixi is a package management tool for developers.
- ๐งช Conda: Leverage the existing conda ecosystem to obtain packages written in Python, C, C++, and many other languages.
- ๐ Reproducibility: Work in dedicated, isolated environments that can be easily recreated.
- ๐ ๏ธ Tasks: Manage complex pipelines effortlessly.
- ๐ Multi Platform: Ensure compatibility across Linux, macOS, Windows, and more.
- ๐งฉ Multi Environment: Compose multiple environments within a single Pixi manifest.
- ๐๏ธ Building: Build packages from source using powerful build backends.
- ๐ฆ Distributing: Distribute your software via conda channels or various other options.
- ๐ Python: Full support for
pyproject.toml
and PyPI dependencies. - ๐ Global Tools: Install globally available tools, safely stored in separate environments.
Installation#
To install pixi
you can run the following command in your terminal:
The above invocation will automatically download the latest version of pixi
, extract it, and move the pixi
binary to ~/.pixi/bin
.
The script will also extend the PATH
environment variable in the startup script of your shell to include ~/.pixi/bin
.
This allows you to invoke pixi
from anywhere.
The above invocation will automatically download the latest version of pixi
, extract it, and move the pixi
binary to LocalAppData/pixi/bin
.
The command will also add LocalAppData/pixi/bin
to your PATH
environment variable, allowing you to invoke pixi
from anywhere.
Tip
You might need to restart your terminal or source your shell for the changes to take effect.
Check out our installation docs to learn about alternative installation methods, autocompletion and more.
Getting Started#
Initialize a new workspace and navigate to the workspace directory.
This will create a Pixi manifest which is a file called pixi.toml
.
It describes the structure, dependencies and metadata of your workspace.
[workspace]
channels = ["conda-forge"]
name = "hello-world"
platforms = ["linux-64", "osx-arm64", "win-64"]
Let's add dependencies!
The dependencies are not only installed, but also tracked in the manifest.
[workspace]
channels = ["conda-forge"]
name = "hello-world"
platforms = ["linux-64", "osx-arm64", "win-64"]
[dependencies]
cowpy = "1.1.*"
python = "3.13.*"
We can now create a Python script which uses the cowpy
library.
The dependencies are installed in a Pixi environment.
In order to run a command within an environment, we prefix it with pixi run
.
__________________
< Hello Pixi fans! >
------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
You can also put this run command in a task.
[workspace]
channels = ["conda-forge"]
name = "hello-world"
platforms = ["linux-64", "osx-arm64", "win-64"]
[tasks]
start = "python hello.py"
[dependencies]
cowpy = "1.1.*"
python = "3.13.*"
After adding the task, you can run the task using its name.
__________________
< Hello Pixi fans! >
------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
You now know how to add dependencies and tasks to your environment. Put the workspace folder on a different machine, and you will find that Pixi will be able to fully reproduce your setup.
If you want to learn more about Pixi, check out the next page!