You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:Conda环境无法找到holidays最新版本,报“Package does not exist”错误

解决Mamba无法找到holidays 0.34及zstd版本不匹配问题

问题背景

使用Mamba 1.5.1管理Conda 23.1.0环境,已配置conda-forge通道,但执行mamba search holidays仅能查到0.9.9至0.17版本,安装holidays=0.34时报错包不存在,同时存在zstd C API版本不匹配的隐藏错误:

ImportError: zstd C API versions mismatch; Python bindings were not compiled/linked against expected zstd version (10505 returned by the lib, 10502 hardcoded in zstd headers, 10502 hardcoded in the cext)

解决步骤

  1. 修复zstd版本不匹配
    zstd版本冲突会导致Mamba无法正常读取压缩的包索引,需优先解决:

    • 卸载当前冲突的zstandard包:
      mamba uninstall zstandard
      
    • 安装适配版本(错误提示期望的10502对应zstd 1.5.2):
      mamba install zstandard=1.5.2
      
    • 若仍有异常,强制重新安装:
      mamba install --force-reinstall zstandard=1.5.2
      
  2. 强制更新conda-forge包索引
    本地索引缓存过期会导致无法检索到最新包,执行以下操作刷新:

    • 清理本地缓存和旧索引文件:
      mamba clean --all
      
    • 更新环境并刷新通道索引:
      mamba update --all --channel conda-forge
      
    • 重新搜索确认新版本是否可见:
      mamba search holidays --channel conda-forge
      
    • 确认能看到0.34版本后,执行安装:
      mamba install holidays=0.34 --channel conda-forge
      
  3. 排除通道优先级干扰(可选)
    若其他通道影响包检索,临时指定仅使用conda-forge安装:

    mamba install holidays=0.34 -c conda-forge --override-channels
    

    也可查看当前通道配置,确保conda-forge处于最高优先级:

    conda config --show channels
    

内容的提问来源于stack exchange,提问作者PHPirate

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.08 08:28:26