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

使用Anaconda安装xarray-spatial遇UnsatisfiableError但无冲突详情

解决conda安装xarray-spatial时无详细信息的UnsatisfiableError问题

问题重现

执行的安装命令:

(geo_env) C:\Users\Alex>conda install -c conda-forge xarray-spatial

错误输出:

(geo_env) C:\Users\Alex>conda install -c conda-forge xarray-spatial
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions
Note that strict channel priority may have removed packages required for satisfiability.

解决方法

  • 调整通道优先级
    错误提示严格的通道优先级可能过滤掉必要包,先查看当前通道设置:

    conda config --show channels
    

    若channel_priority为strict,改为flexible:

    conda config --set channel_priority flexible
    

    之后重新执行安装命令。

  • 获取详细冲突信息
    使用conda solve生成具体冲突报告,定位不兼容包:

    conda activate geo_env
    conda solve --dry-run -c conda-forge xarray-spatial
    

    命令会输出包版本冲突的细节,明确问题根源。

  • 新建干净环境安装
    现有环境依赖复杂时,直接创建新环境安装:

    conda create -n new_geo_env -c conda-forge xarray-spatial
    

    安装完成后激活新环境:

    conda activate new_geo_env
    
  • 使用mamba替代conda
    mamba是conda的高性能替代,求解速度更快、冲突信息更清晰。先在base环境安装mamba:

    conda install -n base -c conda-forge mamba
    

    再在geo_env中用mamba安装:

    conda activate geo_env
    mamba install -c conda-forge xarray-spatial
    

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.10 00:20:47