ERROR: Cannot install apache-airflow[celery]==2.2.0 because these package versions have conflicting dependencies.
The conflict is caused by:
apache-airflow[celery] 2.2.0 depends on cattrs<1.7.0 and ~=1.1; python_version > "3.6"
The user requested (constraint) cattrs==1.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
问问题
389 次
1 回答
1
我在本地当前工作目录中复制了https://raw.githubusercontent.com/apache/airflow/constraints-2.2.0/constraints-3.6.txt文件并将“cattrs==1.0.0”更改为“ cattrs==1.1.0"
然后使用下面的命令进行安装
pip3 install --force-reinstall "apache-airflow[celery]==2.2.0" --constraint constraints.txt
编辑:我后来意识到这个问题是由于使用了错误的约束文件版本。我在我的机器上安装了 Python 3.8,而我使用的是 constraints-3.6.txt 而不是 constraints-3.8.txt
正确的命令应该如下:
pip3 install "apache-airflow[celery]==2.2.0" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
于 2021-10-19T13:20:05.397 回答