Last modified: Jun 14, 2026

Install Pixi Package Manager for Python

Pixi is a fast and reliable package manager built for Python and other languages. It simplifies environment management, dependency resolution, and project setup. In this guide, you will learn how to install Pixi on your system and start using it effectively.

Whether you are a beginner or an experienced developer, Pixi offers a clean alternative to tools like pip and conda. It uses a lockfile to ensure reproducible builds and supports cross-platform workflows. Let us dive into the installation process.

What is Pixi?

Pixi is a cross-platform package manager designed for reproducibility and speed. It uses the conda-forge ecosystem but works independently. Unlike pip, Pixi creates isolated environments by default, preventing dependency conflicts. It also handles non-Python packages like C libraries, making it ideal for data science and machine learning projects.

System Requirements

Before installing Pixi, ensure your system meets these requirements:

  • Windows 10 or later, macOS 10.15+, or Linux (x86_64 or ARM64)
  • At least 500 MB of free disk space
  • An active internet connection
  • Basic command-line knowledge

Pixi works best with a modern shell like bash, zsh, or PowerShell. No prior Python installation is required, but having Python can help with testing.

Step 1: Download Pixi

The easiest way to install Pixi is via the official installer script. Open your terminal and run the following command:


# For Linux and macOS
curl -fsSL https://pixi.sh/install.sh | bash

# For Windows (PowerShell)
iwr -useb https://pixi.sh/install.ps1 | iex

This script downloads the latest Pixi binary and places it in your home directory under ~/.pixi/bin. The installer also adds Pixi to your system's PATH automatically.

After installation, close and reopen your terminal or run source ~/.bashrc (Linux/macOS) to apply the changes.

Step 2: Verify Installation

Check that Pixi is installed correctly by running the version command:


pixi --version

pixi 0.22.0

If you see a version number, the installation was successful. If not, ensure that ~/.pixi/bin is in your PATH. You can add it manually by editing your shell configuration file (e.g., ~/.bashrc).

Step 3: Create a New Project

Now that Pixi is ready, create a new Python project. Navigate to your desired directory and run:


pixi init my_project
cd my_project

This command generates a pixi.toml file and a pixi.lock file. The pixi.toml file defines your project's dependencies, while the lockfile ensures reproducibility.

Let us look at the generated pixi.toml:


[project]
name = "my_project"
version = "0.1.0"
channels = ["conda-forge"]
platforms = ["linux-64"]

[tasks]

[dependencies]
python = ">=3.9"

By default, Pixi sets Python 3.9 or later as the base dependency. You can change the version by editing this file.

Step 4: Add Dependencies

To add packages, use the pixi add command. For example, install numpy and pandas:


pixi add numpy pandas

Pixi resolves dependencies and updates the lockfile automatically. The output shows progress and the final environment summary.


  ✔ Added numpy (1.24.3)
  ✔ Added pandas (2.0.3)
  ✔ Updated environment

You can also specify exact versions:


pixi add "numpy>=1.20,<2.0"

This is useful for maintaining compatibility with older code.

Step 5: Activate the Environment

To use the installed packages, activate the Pixi environment:


pixi shell

This opens a subshell where Python and all dependencies are available. You can verify by running:


python -c "import numpy; print(numpy.__version__)"

1.24.3

Exit the environment by typing exit or pressing Ctrl+D.

Step 6: Run a Python Script

Create a simple script to test the environment. Write the following code in a file called test.py:


# test.py
import numpy as np

# Create an array
arr = np.array([1, 2, 3, 4, 5])
print("Array:", arr)
print("Mean:", np.mean(arr))

Run the script inside the Pixi environment:


pixi run python test.py

Array: [1 2 3 4 5]
Mean: 3.0

The pixi run command executes the script within the project environment without activating the shell. This is convenient for automation scripts.

Step 7: Manage Multiple Environments

Pixi supports multiple environments within a single project. Edit your pixi.toml to add a development environment:


[project]
name = "my_project"
version = "0.1.0"
channels = ["conda-forge"]
platforms = ["linux-64"]

[tasks]
dev = "pytest"

[environments]
default = { dependencies = ["python=3.9", "numpy", "pandas"] }
dev = { dependencies = ["python=3.9", "numpy", "pandas", "pytest"] }

Then activate the dev environment:


pixi shell -e dev

This keeps your production environment lean while allowing additional testing tools in development.

Step 8: Update and Remove Packages

To update all dependencies to their latest compatible versions, run:


pixi update

To remove a package, use pixi remove:


pixi remove pandas

Pixi automatically updates the lockfile and removes the package from the environment.

Common Issues and Solutions

If the installer fails, check your internet connection or try using a VPN. On Windows, ensure that PowerShell execution policy allows scripts. Run Set-ExecutionPolicy RemoteSigned -Scope CurrentUser if needed.

If pixi is not found after installation, restart your terminal or add ~/.pixi/bin to your PATH manually. On Linux/macOS, edit ~/.bashrc or ~/.zshrc and add:


export PATH="$HOME/.pixi/bin:$PATH"

Then run source ~/.bashrc to reload.

Conclusion

Installing Pixi package manager for Python is straightforward and provides a robust solution for managing dependencies and environments. You learned how to download, verify, create projects, add packages, and run scripts efficiently. Pixi's lockfile ensures reproducibility, making it a valuable tool for collaborative and production projects.

Start using Pixi today to simplify your Python workflow and avoid dependency headaches. Experiment with different environments and packages to see how fast and reliable it is.