C.W.K.
Stream
Lesson 05 of 05 · published

pixi Wisdom

~9 min · pixi, wisdom, production

Level 0Newbie
0 XP0/55 lessons0/16 achievements
0/80 XP to next level80 XP to go0% complete

pixi is the youngest tool in this quest. These rules let you adopt it as a credible long-term bet.

pixi is for projects that need conda-forge. If your project is pure Python with no compiled deps, plain uv is simpler. pixi shines when you need PyTorch + CUDA, GDAL, ffmpeg, R packages, or other heavy binary deps that conda-forge solves and PyPI doesn't.

Always commit pixi.lock. Same iron rule as every other lockfile in this quest. pixi.lock is text-based, fairly stable, and IS your reproducibility.

Use pixi run, not pixi shell, for one-off commands. Saves the activation overhead and is closer to how you'd write it in a Makefile or CI script.

Use the task runner instead of Makefile. Tasks in pixi.toml have depends_on, environment selection, cross-platform args. They're more capable than basic Make targets and they live next to your deps.

Watch the project — it's still moving fast. pixi has a release every 1-2 weeks and breaking changes happen. Pin the pixi version with [pixi] in pixi.toml if you want stability across team members.

Migrate from conda incrementally. 'pixi init --import environment.yml' gives you a working pixi.toml on day one. Iterate on tasks, features, and environments as your project's complexity demands.

Code

GitHub Actions: pixi as the install step·yaml
# .github/workflows/ci.yml
name: ci
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: prefix-dev/setup-pixi@v0.8.1
        with:
          cache: true
      - run: pixi install --locked        # strict, fails on lockfile drift
      - run: pixi run test
      - run: pixi run lint

External links

Exercise

Pick one conda-based project that's been bothering you (slow installs, broken env, hard to share). Try migrating: 'pixi init --import environment.yml' in a new branch. Time the difference. If it works for that project's deps, you've found your data-science default for the next year.

Progress

Progress is local-only — sign in to sync across devices.
Spotted a bug or have feedback on this page?Report an Issue

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.