Skip to content

cache.pypi-mapping in config.toml is ignored, only PIXI_CACHE_DIR is recognized #6281

Description

@npfernandes

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

$ pixi install
 WARN cache for Repodata at <path>/.cache/rattler/cache/repodata is on a network/parallel filesystem (NFS/SMB/FUSE/BeeGFS/Lustre/GPFS/CephFS), redirected to /tmp/pixi-cache-<user>/repodata for this run. Set [cache.repodata] in config.toml or PIXI_CACHE_DIR to override, or [cache.netfs-redirect] = "never" to keep the original path.
 WARN cache for PypiMapping at <path>/.cache/rattler/cache/conda-pypi-mapping is on a network/parallel filesystem (NFS/SMB/FUSE/BeeGFS/Lustre/GPFS/CephFS), redirected to /tmp/pixi-cache-<user>/conda-pypi-mapping for this run. Set [cache.conda-pypi-mapping] in config.toml or PIXI_CACHE_DIR to override, or [cache.netfs-redirect] = "never" to keep the original path.
✔ The default environment has been installed.

Issue description

OS: Linux (HPC cluster, Lustre filesystem)

When running pixi install with the cache on a network/parallel filesystem (Lustre), Pixi emits a warning recommending the user set [cache.repodata] and [cache.conda-pypi-mapping] in config.toml to override the redirect behaviour:

$ pixi install
 WARN cache for Repodata at <path>/.cache/rattler/cache/repodata is on a network/parallel filesystem (NFS/SMB/FUSE/BeeGFS/Lustre/GPFS/CephFS), redirected to /tmp/pixi-cache-<user>/repodata for this run. Set [cache.repodata] in config.toml or PIXI_CACHE_DIR to override, or [cache.netfs-redirect] = "never" to keep the original path.
 WARN cache for PypiMapping at <path>/.cache/rattler/cache/conda-pypi-mapping is on a network/parallel filesystem (NFS/SMB/FUSE/BeeGFS/Lustre/GPFS/CephFS), redirected to /tmp/pixi-cache-<user>/conda-pypi-mapping for this run. Set [cache.conda-pypi-mapping] in config.toml or PIXI_CACHE_DIR to override, or [cache.netfs-redirect] = "never" to keep the original path.
✔ The default environment has been installed.

So I edited my config.toml file to look like this, as instructed, simply setting the /tmp directories as the cache:

[cache]
repodata = "/tmp/pixi-cache-<user>/repodata"
conda-pypi-mapping = "/tmp/pixi-cache-<user>/conda-pypi-mapping"

This resulted in:

$ pixi install
 WARN Ignoring 'cache.conda-pypi-mapping' in <path>/.pixi/config.toml
 WARN cache for PypiMapping at <path>/.cache/rattler/cache/conda-pypi-mapping is on a network/parallel filesystem (NFS/SMB/FUSE/BeeGFS/Lustre/GPFS/CephFS), redirected to /tmp/pixi-cache-<user>/conda-pypi-mapping for this run. Set [cache.conda-pypi-mapping] in config.toml or PIXI_CACHE_DIR to override, or [cache.netfs-redirect] = "never" to keep the original path.
✔ The default environment has been installed.

Reading the documentation showed that the actual setting I should be using is 'pypi-mapping', so I edited my config.toml:

[cache]
repodata = "/tmp/pixi-cache-<user>/repodata"
pypi-mapping = "/tmp/pixi-cache-<user>/conda-pypi-mapping"

Surprisingly, the warning did not go away:

$ pixi install
 WARN cache for PypiMapping at <path>/.cache/rattler/cache/conda-pypi-mapping is on a network/parallel filesystem (NFS/SMB/FUSE/BeeGFS/Lustre/GPFS/CephFS), redirected to /tmp/pixi-cache-<user>/conda-pypi-mapping for this run. Set [cache.conda-pypi-mapping] in config.toml or PIXI_CACHE_DIR to override, or [cache.netfs-redirect] = "never" to keep the original path.
✔ The default environment has been installed.

Only when I set my PIXI_CACHE_DIR environment variable and then run pixi install did the warnings finally disappear:

$ export PIXI_CACHE_DIR="/tmp/pixi-cache-<user>/"
$ pixi install
✔ The default environment has been installed.

Is this intended behavior? pixi seems to be ignoring the cache settings in config.toml and recognizing only directly set environment variables.

Expected behavior

I would expect for the cache settings in config.toml to be respected, bypassing the need to set environment variables directly.

Activity

  1. added
    bug
    on Jun 4, 2026
  2. baszalmstra commented on Jun 4, 2026

    @baszalmstra
    Contributor

    Thanks for the very thorough write-up, it made this easy to pin down. There were actually two separate problems here.

    First, the warning text was misleading: it told you to set [cache.conda-pypi-mapping], but the key pixi actually accepts is [cache.pypi-mapping]. So following the warning literally landed you on a key that got ignored. This is fixed in #6282.

    Second, and this is the one you ran into even after switching to the correct pypi-mapping key: the conda-pypi mapping cache resolved its path only from the global (system/user) config and never looked at your workspace .pixi/config.toml. That is why your repodata override took effect but pypi-mapping did not, and why only PIXI_CACHE_DIR made the warning go away. It also explains why the warning kept naming PypiMapping specifically. This is fixed in #6284.

    With both in place, a [cache.pypi-mapping] set in your .pixi/config.toml is honored and the redirect no longer fires.

    Until they land, setting pypi-mapping in your global user config.toml (rather than the workspace .pixi/config.toml) is a working stopgap, as is PIXI_CACHE_DIR.

  3. npfernandes commented on Jun 4, 2026

    @npfernandes
    Author

    Thanks for the quick reply and fix!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions