Repository navigation
docs: clarify how pixi resolves conda vs PyPI dependencies - #819
InessaPawson wants to merge 8 commits into
Conversation
✅ Deploy Preview for python-package-guide ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
@ruben-arts We'd appreciate your feedback on this PR. 🙏 |
4294a4d to
7f392e3
Compare
|
@all-contributors please add @ruben-arts for review, docs |
|
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. |
There was a problem hiding this comment.
| 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. |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
@lwasser The way I understand it, pixi has 4 main advantages:
- One lock file. Unlike environment.yml, which is a spec, pixi.lock pins both conda and PyPI dependencies across all declared platforms.
- 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.
- Project-scoped envs. Environments live in .pixi/envs/. No manual activation needed with pixi run, or use pixi shell for an interactive session.
- 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
left a comment
There was a problem hiding this comment.
I'd actually love some changes on this one to clarify the power of pixi vs just using conda. great additions here !!
|
Awesome to add pixi! Thanks |
a32db47 to
6356041
Compare
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>
d7ed09a to
21c5ead
Compare
6c9c7ef to
e190e90
Compare
Updates the pixi section to make clear that
pixi addinstalls from conda channels by default andpixi add --pypiinstalls from PyPI, with a matching manifest example.Closes #589.