【问题标题】:Conda UnsatisfiableError even when seemingly there isn't any conflictConda UnsatisfiableError 即使看似没有任何冲突
【发布时间】:2021-12-13 16:45:49
【问题描述】:

例如我有以下environment.yml文件

name: harmonic-backend
channels:
  - conda-forge
dependencies:
  - python==3.8.10
  - apache-beam==2.31.0
  - pyarrow==4.0.1

prefix: /opt/homebrew/Caskroom/miniforge/base/envs/harmonic-backend

以下是我尝试相应地创建环境时的输出

sumit@Sumits-MacBook-Air backend % conda env create
Collecting package metadata (repodata.json): done
Solving environment: -
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed
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

Package python conflicts for:
apache-beam==2.31.0 -> crcmod[version='>=1.7,<2.0'] -> python[version='3.8.*|>=2.7|>=3|>=3.6|>=3.9,<3.10.0a0']
python==3.8.10
apache-beam==2.31.0 -> python[version='>=3.8,<3.9.0a0']

Package pyarrow conflicts for:
apache-beam==2.31.0 -> pyarrow[version='>=0.15.1,<5.0.0']
pyarrow==4.0.1

Package setuptools conflicts for:
python==3.8.10 -> pip -> setuptools
apache-beam==2.31.0 -> grpcio[version='>=1.29.0,<2'] -> setuptools

Package ncurses conflicts for:
pyarrow==4.0.1 -> python[version='>=3.9,<3.10.0a0'] -> ncurses[version='>=6.2,<6.3.0a0']
python==3.8.10 -> readline[version='>=8.1,<9.0a0'] -> ncurses[version='>=6.2,<6.3.0a0']

查看输出,我找不到任何冲突。这是怎么回事,我该如何解决?

有关更多上下文,我在 M1 mac 上使用brew 安装的miniforge

【问题讨论】:

  • 拥有准确每个包的这些版本有多重要?
  • @MattThompson 根据我的分析,放松版本无济于事。 osx-arm64 平台的所有apache-beam 构建都依赖于dill &gt;=0.3.1.1,&lt;0.3.2,但没有这样的包。

标签: python conda apple-m1 conda-forge mini-forge


【解决方案1】:

已修复

这要归功于 apache-beam-feedstock 维护者之一的努力(参见 Issue)。

以供将来参考,当发现此类故障时,请将其报告给 Conda Forge 原料维护人员。 osx-arm64 的许多构建都经过编译和打包,但没有设置任何 CI 基础设施来测试它们。因此,维护者依赖于社区中的最终用户,当他们提出原生 osx-arm64 硬件时向他们提出问题。

否则,如果未立即实施修复,Apple Silicon 用户应考虑不使用 osx-arm64 平台的容器化解决方案(例如 Docker)。或者使用 Rosetta 来模拟 osx-64 平台。


故障分析(过时)

Mamba 给出了更易解释的结果(假设您使用的是原生 osx-arm64 平台):

$ CONDA_SUBDIR=osx-arm64 mamba create -n foo python=3.8.10 apache-beam=2.31.0 pyarrow=4.0.1

                  __    __    __    __
                 /  \  /  \  /  \  /  \
                /    \/    \/    \/    \
███████████████/  /██/  /██/  /██/  /████████████████████████
              /  / \   / \   / \   / \  \____
             /  /   \_/   \_/   \_/   \    o \__,
            / _/                       \_____/  `
            |/
        ███╗   ███╗ █████╗ ███╗   ███╗██████╗  █████╗
        ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
        ██╔████╔██║███████║██╔████╔██║██████╔╝███████║
        ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
        ██║ ╚═╝ ██║██║  ██║██║ ╚═╝ ██║██████╔╝██║  ██║
        ╚═╝     ╚═╝╚═╝  ╚═╝╚═╝     ╚═╝╚═════╝ ╚═╝  ╚═╝

        mamba (0.16.0) supported by @QuantStack

        GitHub:  https://github.com/mamba-org/mamba
        Twitter: https://twitter.com/QuantStack

█████████████████████████████████████████████████████████████


Looking for: ['python=3.8.10', 'apache-beam=2.31.0', 'pyarrow=4.0.1']

conda-forge/noarch       Using cache
bioconda/noarch          Using cache
pkgs/main/noarch         [====================] (00m:00s) No change
pkgs/r/osx-arm64         [====================] (00m:00s) 404 Failed
pkgs/r/noarch            [====================] (00m:00s) No change
pkgs/main/osx-arm64      [====================] (00m:00s) Done
bioconda/osx-arm64       [====================] (00m:00s) 404 Failed
conda-forge/osx-arm64    [====================] (00m:00s) Done
Encountered problems while solving:
  - nothing provides dill >=0.3.1.1,<0.3.2 needed by apache-beam-2.31.0-py38hea4295b_0

apache-beam=2.31.0 想要的dill 包不适用于osx-arm64 平台。根本问题是dill 不需要构建 apache-beam 包,并且由于 Azure 不提供本机 M1 映像,Conda Forge 管道从不测试 osx- arm64 构建实际上是可安装的(!)。

【讨论】:

    猜你喜欢
    • 2017-10-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-09
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多