通过 conda 和 pip 安装 eomaps 时出错

Error installing eomaps through conda and pip

我在尝试使用 Conda 安装 eomaps 时收到以下错误输出。我不知道如何解决这个问题。我也使用 pip 尝试过相同的方法,但它似乎并没有解决问题。这是 Conda 报告的错误:

(base) C:\Windows\system32>conda install -c conda-forge eomaps
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.

这里是pip报错:

ERROR: Failed building wheel for cartopy
ERROR: Command errored out with exit status 1:
------
ERROR: Failed building wheel for fiona
ERROR: Could not build wheels for cartopy which use PEP 517 and cannot be installed directly

我怎样才能安装这个?

EOmaps 在这里开发...

我认为问题在于您正在(基本)环境中安装软件包!您很可能安装了一些与 EOmaps 的要求冲突的软件包(cartopypyproj 等的先前版本?),这就是 conda-solver 不成功的原因。

我强烈建议在新环境中工作,而不是在基础环境中工作!
(结帐conda user-guide - managing environments

例如,以下应该可以正常工作:

conda create -n eomaps_env python=3.9
conda activate eomaps_env

conda install -c conda-forge eomaps

(名称eomaps_env和python版本都是可选的,您可以将其更改为您喜欢的任何名称和版本!)


为了加快解决复杂的依赖关系,您还可以尝试使用 mamba(conda 包管理器的 c++ 重新实现),它与 conda 的功能完全相同(但解决依赖关系的速度要快得多):

conda create -n eomaps_env python=3.9
conda activate eomaps_env
conda install -c conda-forge mamba

mamba install -c conda-forge eomaps