pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Option to disable or bypass cache for `--no-binary` PyPI packages (e.g. mpi4py)

Open yoshipon opened this issue 3 months ago • 0 comments

Hi, thank you very much for the great work on Pixi!

Problem description

I’m working on an HPC-oriented GPU cluster where some system libraries such as MPI are managed externally and may change due to system maintenance. When installing packages like mpi4py with --no-binary, the build needs to link against the current system’s MPI installation.

However, once the package is built, it gets cached under $HOME/.cache/rattler/, and it seems that Pixi reuses this cached artifact even when the system MPI has changed. As far as I know, there is currently no straightforward way to disable or invalidate this cache.

Current workaround and my request

I understand that running pixi clean cache or changing PIXI_CACHE_DIR can be used as a workaround, but these approaches are somewhat error-prone and easy to forget. Therefore, I would really appreciate having an option such as --no-cache, or a mechanism to disable caching for specific packages or PyPI sources.

This feature would be especially useful in HPC environments where system-level libraries are frequently updated.

Thank you very much for considering this request!

Related links

  • Discord discussion: https://discord.com/channels/1082332781146800168/1426963763143381114

yoshipon avatar Oct 18 '25 08:10 yoshipon