Reputation: 360
I am getting below error while trying to follow the installation steps at https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html
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
Upvotes: 2
Views: 2016
Reputation: 360
I made a copy of https://raw.githubusercontent.com/apache/airflow/constraints-2.2.0/constraints-3.6.txt file in my present working directory locally and changed the "cattrs==1.0.0" to "cattrs==1.1.0"
and then used below command for installation
pip3 install --force-reinstall "apache-airflow[celery]==2.2.0" --constraint constraints.txt
Edit: I later realized that issue was due to using wrong constraints file version. I had Python 3.8 installed on my machine while I was using constraints-3.6.txt instead of constraints-3.8.txt
Correct command should be as below:
pip3 install "apache-airflow[celery]==2.2.0" --constraint "https://raw.githubusercontent.com/apache/airflow/constraints-${AIRFLOW_VERSION}/constraints-${PYTHON_VERSION}.txt"
Upvotes: 4