Why Multiple Environments?
Multiple environments solve many real-world scenarios:Testing Multiple Package Versions
Testing Multiple Package Versions
Test your code against different versions:
Smaller Single-Purpose Environments
Smaller Single-Purpose Environments
Create focused environments for specific tasks:
Large Combined Development Environment
Large Combined Development Environment
Combine multiple features into one development environment:
Testing Production Environment
Testing Production Environment
Test production with additional dependencies:
Multiple System Requirements
Multiple System Requirements
Support different hardware in one workspace:
Features and Environments
Pixi uses features to define environment components. Features can specify:dependencies- Conda packagespypi-dependencies- PyPI packagessystem-requirements- System specificationsactivation- Activation scripts and env varsplatforms- Supported platformschannels- Package channels (with priority)target- Platform-specific configurationtasks- Feature-specific tasks
The Default Feature
All base configuration is part of thedefault feature:
Defining Features
Create custom features for different purposes:Channels in features concatenate using priority (higher priority comes first). Default channels are still used.
Creating Environments
Combine features to create environments:The
default feature is automatically included unless you set no-default-feature = true.Environment Without Default
Create isolated environments that don’t include base dependencies:Solve Groups
Solve groups ensure multiple environments share compatible package versions:Using Environments
Default Environment
Specific Environment
Default Environment for Tasks
Set which environment runs a task by default:Ambiguous Task Selection
When a task exists in multiple environments, Pixi prompts for selection:Tasks defined in features override tasks in the default environment.
Lock File Structure
The lock file tracks which environments use which packages:Real-World Examples
Python Version Matrix Testing
Production vs Testing
Multi-Hardware Support
From themulti-machine example: