Skip to main content
Learn how to manage multiple packages within a single workspace, enabling local development of interdependent libraries.
pixi-build is a preview feature and will change until stabilized. Keep this in mind when using it for your projects.

Why Use Workspaces?

Workspaces solve several development challenges:
  • Local development - Work on multiple packages simultaneously
  • Source dependencies - Depend on unreleased versions
  • Monorepo support - Manage related packages in one repository
  • Cross-language projects - Mix Python, C++, Rust, and more
  • Shared configuration - Common channels, platforms, and settings
Normally, conda packages come pre-built from channels. Workspaces let you depend on the source code directly, which is built automatically as needed.

Creating a Multi-Package Workspace

Workspace Patterns

Python-Only Workspace

Multiple Python packages:
pixi.toml
With sub-packages:
src/root/pyproject.toml
  1. Depend on another package in the workspace
src/depend/pyproject.toml
  1. External conda dependencies

Workspace with Dev Dependencies

Use [dev] instead of [dependencies] to install only build-time dependencies:
pixi.toml
  1. [dev] installs build and host dependencies but not the package itself
Use [dependencies] when:
  • You want the built package installed in the environment
  • You’re creating a library for others to use
  • You need to test the installed package
Use [dev] when:
  • You only need build-time dependencies
  • You’re developing the package and don’t need it installed
  • You want faster iteration without package installation

Complete Workspace Example

Here’s the C++ package configuration:
packages/cpp_math/CMakeLists.txt
packages/cpp_math/src/math.cpp

Workspace Commands

Advanced Workspace Configuration

Multiple Workspace Packages

You can have multiple packages at the root level:
pixi.toml

Workspace with Variants

Build packages against multiple versions:
pixi.toml
  1. Define allowed Python versions
  2. Create environments for each variant
See the variants guide for details.

Best Practices

Group related packages:
Keep package versions synchronized:
Keep sub-packages minimal - they inherit from the workspace:
packages/subpkg/pixi.toml
Comment why packages depend on each other:

Next Steps

Build Variants

Build against multiple dependency versions

Dependency Types

Understand build, host, and run dependencies

Package Sources

Use git, path, or URL sources

Python Packages

Build Python packages in workspaces

Troubleshooting

Ensure the path is correct relative to the workspace root:
Pixi doesn’t support circular dependencies between packages. Restructure to have a clear dependency hierarchy.
Pixi automatically determines build order based on dependencies. If builds fail, check that all dependencies are properly declared.
Only packages within the same workspace root inherit settings. External path dependencies don’t inherit workspace configuration.