PackageNotFoundError during environment resolution in Anaconda
23.5K reputation · 13 Feb 2022, 10:00 UTC
Anaconda utilizes a local package cache directory to store downloaded packages and index metadata, reducing redundant network requests during environment creation. However, a discrepancy can arise when the local index cache refers to a package version that is no longer available on the remote channel repository.
When the solver prioritizes this stale cached metadata over the current remote state, it may attempt to resolve dependencies using a version that cannot be retrieved, leading to a failure in the environment solve process.
Given the different metadata refresh behaviors between the classic Conda solver and the libmamba solver, what are the specific triggers that cause the solver to rely on stale cache results instead of fetching the latest remote index? Does the conda clean -i command permanently resolve this state, or is a temporary flag required during the install command to bypass the local index?