Skip to content

docs: clarify how pixi resolves conda vs PyPI dependencies - #819

Open
InessaPawson wants to merge 8 commits into
pyOpenSci:mainfrom
InessaPawson:589-pixi
Open

InessaPawson wants to merge 8 commits into
pyOpenSci:mainfrom
InessaPawson:589-pixi

Conversation

@InessaPawson

Copy link
Copy Markdown
Contributor

Updates the pixi section to make clear that pixi add installs from conda channels by default and pixi add --pypi installs from PyPI, with a matching manifest example.
Closes #589.

@netlify

netlify Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for python-package-guide ready!

Name Link
🔨 Latest commit 6bbdcf2
🔍 Latest deploy log https://app.netlify.com/projects/python-package-guide/deploys/6af15acb121486b7f09ee584
😎 Deploy Preview https://deploy-preview-819--python-package-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@InessaPawson

Copy link
Copy Markdown
Contributor Author

@ruben-arts We'd appreciate your feedback on this PR. 🙏

@ruben-arts ruben-arts left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This look great to me!

@lwasser

lwasser commented Oct 21, 2026

Copy link
Copy Markdown
Member

@all-contributors please add @ruben-arts for review, docs

@allcontributors

Copy link
Copy Markdown
Contributor

@lwasser

I've put up a pull request to add @ruben-arts! 🎉


Here, Pixi installs `numpy` and `gdal` from conda-forge and only `scipy` from PyPI. You can confirm where each package came from with `pixi list`.

This is the same outcome as creating a conda environment, installing `numpy` and `gdal` with conda, and then running `pip install scipy` inside it. The difference is that the conda-vs-PyPI split is declared explicitly in the manifest and captured in the lock file, so there is no ambiguity about how a given dependency will be resolved at install time.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is the same outcome as creating a conda environment, installing `numpy` and `gdal` with conda, and then running `pip install scipy` inside it. The difference is that the conda-vs-PyPI split is declared explicitly in the manifest and captured in the lock file, so there is no ambiguity about how a given dependency will be resolved at install time.
The above process, which created a Python environment using Pixi, produces the same outcome environment as you might do creating a conda environment using `conda create` and then installing `numpy` and `gdal` with conda, and then running `pip install scipy` inside it. The difference is that the conda-vs-PyPI split is declared explicitly in the manifest and captured in the lock file, so there is no ambiguity about how a given dependency will be resolved at install time.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This statement is actually confusing too. You can add a pip: section to a conda environment. yml file. and that is explicit. Can you clarify what this actually does that is different from using an environment.yml file that has a pip section?

i think maybe leaning into the speed gains might be a better summary saying - this is similar to creating a conda environment with a pip section - so it's declarative but pixi adds

x, y, z value to. the process

Emphasize the similarities, but also how they differ and how Pixi gives you more power. @ruben-arts I'd love your input here because I am not a Pixi user, but this statement doesn't clearly articulate the value I think Pixi provides to a user!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lwasser The way I understand it, pixi has 4 main advantages:

  1. One lock file. Unlike environment.yml, which is a spec, pixi.lock pins both conda and PyPI dependencies across all declared platforms.
  2. Coordinated solve. Pixi solves conda dependencies first, then PyPI dependencies using uv, treating matching conda packages as locked to avoid duplicate installations and version conflicts.
  3. Project-scoped envs. Environments live in .pixi/envs/. No manual activation needed with pixi run, or use pixi shell for an interactive session.
  4. And yes, speed (it's built in Rust).

Thank you so much for the review, Leah! I’ll rewrite the paragraph to spell out those differences.

cc @ruben-arts

@lwasser lwasser left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd actually love some changes on this one to clarify the power of pixi vs just using conda. great additions here !!

@tkoyama010

Copy link
Copy Markdown
Member

Awesome to add pixi! Thanks

@InessaPawson
InessaPawson force-pushed the 589-pixi branch 2 times, most recently from a32db47 to 6356041 Compare November 9, 2026 03:15
InessaPawson and others added 6 commits November 8, 2026 22:50
Co-authored-by: Leah Wasser <leah@pyopensci.org>
Co-authored-by: Leah Wasser <leah@pyopensci.org>
Co-authored-by: Leah Wasser <leah@pyopensci.org>
Co-authored-by: Leah Wasser <leah@pyopensci.org>
@InessaPawson
InessaPawson requested a review from lwasser November 9, 2026 05:32

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enh: Package & environment manager content -- be clear about how pixi environments work

4 participants