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

Apache Airflow 2.2.0(Celery组件)安装报错:cattrs依赖版本冲突问题咨询

Fixing Dependency Conflict When Installing apache-airflow[celery]2.2.0 with cattrs1.0.0

Let's break down what's happening here and how to fix it:

The Root Cause

When you try to install apache-airflow[celery]==2.2.0 while pinning cattrs==1.0.0, pip throws a conflict error because:

apache-airflow[celery] 2.2.0 requires cattrs<1.7.0, ~=1.1 when running on Python versions >3.6. Your specified cattrs==1.0.0 falls outside this version range, which creates the dependency clash.

Solutions to Resolve the Conflict

Here are two straightforward fixes:

  • Relax the cattrs version constraint
    Update your cattrs version spec to match Airflow's requirements. Use a range that fits both needs, like this:

    pip install apache-airflow[celery]==2.2.0 cattrs~=1.1,<1.7.0
    

    This tells pip to install a cattrs version that's at least 1.1.x but less than 1.7.0, which aligns perfectly with Airflow 2.2.0's dependency rules.

  • Remove the cattrs version pin entirely
    If you don't have a strict requirement for cattrs==1.0.0, let pip handle dependency resolution automatically by omitting the version constraint:

    pip install apache-airflow[celery]==2.2.0
    

    Pip will pick a cattrs version that satisfies Airflow's requirements without any conflicts.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.04.30 19:37:43