Pixi: Multi-Language Package and Workflow Manager
Pixi is a cross-platform package manager and workflow tool that manages both conda-forge packages and PyPI packages from a single project manifest. It replaces conda’s global environment model with project-local environments and automatic lock files.
Note
Pixi targets the same package ecosystem as conda but with a different workflow model. If you don’t need conda-forge packages, uv is a simpler choice. See When should I choose pixi over uv? for a detailed comparison.
When to use pixi
Use pixi when your project depends on native libraries that conda-forge packages more reliably than PyPI: CUDA toolkits, GDAL, HDF5, OpenCV, MKL, NetCDF. Some of these have PyPI packages, but conda-forge bundles the underlying C/C++/Fortran libraries so you don’t need to install them separately. Pixi also works well for mixed-language projects (Python + R, Python + C++) and for teams that want reproducible cross-platform lock files covering both conda and PyPI dependencies.
For pure Python projects, uv provides a simpler workflow.
Installation
curl -fsSL https://pixi.sh/install.sh | bashThis installs the pixi binary to ~/.pixi/bin (macOS/Linux) or %UserProfile%\.pixi\bin (Windows). See the official installation guide for other methods.
Project setup
Initialize a new project with pixi init:
pixi init my-project
cd my-projectThis creates a pixi.toml manifest:
[workspace]
authors = ["Your Name <you@example.com>"]
channels = ["conda-forge"]
name = "my-project"
platforms = ["osx-arm64"] # auto-detected from your system
version = "0.1.0"
[dependencies]
[tasks]To use pyproject.toml instead (useful if you’re building a Python package):
pixi init --format pyproject my-projectWith pyproject.toml, pixi configuration lives under [tool.pixi.*] sections (e.g. [tool.pixi.workspace], [tool.pixi.dependencies]), while standard [project] metadata remains portable to other Python tools.
Managing dependencies
Conda packages
pixi add python numpy pandasPyPI packages
pixi add --pypi requestsPixi resolves conda dependencies first, then resolves PyPI packages against what conda already installed. It uses uv internally for PyPI resolution.
Installing the environment
pixi installThis creates a .pixi/ directory containing the project environment. The directory is local to the project and should be added to .gitignore (pixi does this automatically on pixi init).
Running commands
# Run a command in the project environment
pixi run python main.py
# Start an interactive shell
pixi shellTasks
Pixi includes a built-in task runner. Tasks are defined in pixi.toml and run within the project environment.
# Add tasks
pixi task add test "pytest -s"
pixi task add lint "ruff check ."
# Run a task
pixi run testTasks can also be defined directly in pixi.toml with dependencies on other tasks:
[tasks]
lint = "ruff check ."
test = { cmd = "pytest -s", depends-on = ["lint"] }Multi-environment support
Pixi can define multiple environments from composable “features.” Each feature is a named set of dependencies; environments combine one or more features. Named environments include the default feature’s dependencies unless you set no-default-feature = true.
[dependencies]
python = ">=3.12"
numpy = ">=2.0"
[feature.test.dependencies]
pytest = ">=8"
[feature.docs.dependencies]
sphinx = ">=7"
[environments]
test = ["test"]
docs = ["docs"]Run commands in a specific environment:
pixi run --environment test pytest
pixi run --environment docs sphinx-build docs buildCross-platform lock files
Pixi resolves dependencies for all target platforms in a single pixi.lock file. Add platforms with:
pixi workspace platform add linux-64 win-64The lock file captures the full dependency graph for every platform and environment combination. Each platform is solved separately, so exact builds may differ across OSes, but every collaborator gets a reproducible install for their platform.
Tool management
Like pipx or uvx, pixi can install CLI tools globally or run them in temporary environments:
# Install a tool globally
pixi global install ruff
# Run a tool without installing it
pixi exec black --check .
# List globally installed tools
pixi global listOther useful commands
# Search for a package on configured channels
pixi search opencv
# Show the dependency tree
pixi tree
# Show environment and system info
pixi info
# Update dependencies to latest compatible versions
pixi updateLearn more
Also Mentioned In
Get Python tooling updates
Subscribe to the newsletter