Skip to content

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

Open
InessaPawson wants to merge 1 commit into
pyOpenSci:mainfrom
InessaPawson:589-pixi
Open

InessaPawson wants to merge 1 commit 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 7f392e3
🔍 Latest deploy log https://app.netlify.com/projects/python-package-guide/deploys/6ad7b1020e90e3d6db11a7ae
😎 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! 🎉

pixi add numpy

# Install your package in dev mode
# Install your package in dev mode from PyPI

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.

Hey there, @InessaPawson, I have a question. Installing in dev mode frm PyPI doesn't fit into my mental model of editable mode because I think editable mode is when you work on the package locally so it's a local link to the package's flat files, and you can edit those files and restart the "kernel" or python session to see the new changes live. So it's not from PyPI

Suggested change
# Install your package in dev mode from PyPI
# Install your package in development (or editable) mode


# Add Python packages
pixi add numpy pandas
# Add packages from conda-forge (the default)

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
# Add packages from conda-forge (the default)
# Add packages from conda-forge (Pixi's default)


# Add conda packages (like GDAL)
pixi add gdal
# Add packages from PyPI (only if a package isn't on conda-forge)

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
# Add packages from PyPI (only if a package isn't on conda-forge)
# Add packages from PyPI (only do this if a package isn't on conda-forge)

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 am not sure, but i wonder if this is a best practice - so only install from pypi if it's not on conda-forge, and this would be because of channel mixing being "dangerous" to do in environments? ignore if i am wrong as i am not an active pixi user!

pixi shell
```

The commands above produce a manifest like this:

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
The commands above produce a manifest like this:
The commands above produce output toml file (also known as a manifest) that describes your environment setup like this:

scipy = ">=1.16.3, <2"
```

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`.

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
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`.
Here, Pixi installs `numpy` and `gdal` from conda-forge and `scipy` from PyPI. You can confirm where each package came from with `pixi list`.


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!

@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 !!

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

3 participants