Conda不可满足的错误,即使表面上没有任何冲突

Conda UnsatisfiableError even when seemingly there isn#39;t any conflict(Conda不可满足的错误,即使表面上没有任何冲突)

本文介绍了Conda不可满足的错误,即使表面上没有任何冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,我有以下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

推荐答案

已修复

这要归功于一位阿帕奇梁式进料维护员的努力(见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平台。根本问题是构建apache-beam包不需要dill,而且由于Azure不提供本机M1镜像,Conda Forge管道从不测试osx-arm64构建是否实际可安装(!)。

这篇关于Conda不可满足的错误,即使表面上没有任何冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本文标题为:Conda不可满足的错误,即使表面上没有任何冲突

基础教程推荐