Skip to main content
Pixi is designed to work across all major platforms. When building applications that run on multiple operating systems or architectures, you need platform-specific configuration. This guide shows you how.

Platform Definition

Define supported platforms in your workspace:

Supported Platforms

  • linux-64 - Linux x86_64
  • linux-aarch64 - Linux ARM64
  • osx-64 - macOS Intel
  • osx-arm64 - macOS Apple Silicon
  • win-64 - Windows x86_64
Pixi determines which dependencies to install for each platform individually, storing everything in the lock file.

Platform Validation

Running pixi install on an unsupported platform shows a warning:

Target Specifiers

Use target specifiers to configure platform-specific settings. The [target.<platform>] section overrides default configuration for specific platforms.
You can only target platforms listed in workspace.platforms. Targeting unlisted platforms causes an error.

Platform-Specific Dependencies

Install different packages or versions per platform:
Platform-specific dependencies override (not merge with) the base dependencies for that package.

Using the CLI

Add platform-specific dependencies from the command line:
This generates:

Host and Build Dependencies

Platform-specific dependencies work with host and build dependencies too:
Results in:

Platform-Specific Activation

Different platforms often require different activation scripts:
On Windows, only the target.win-64.activation.scripts run - the base activation.scripts are replaced, not merged.

Activation Environment Variables

Set platform-specific environment variables:

Platform-Specific System Requirements

Define different system requirements per platform:

Complete Example

Here’s a real-world multi-platform configuration:

Multi-Platform with Multiple Environments

Combine platform targeting with multiple environments:
Usage:

Best Practices

Define All Target Platforms
Use Platform-Specific Activation
Test on All Platforms
Document Platform Requirements
Cross-Platform Python
Platform-Specific Compilers
Hardware Acceleration