jayckaiser opened a new issue, #31552:
URL: https://github.com/apache/airflow/issues/31552

   ### Apache Airflow version
   
   2.6.1
   
   ### What happened
   
   We install Airflow in a virtual environment using pip and constraints files, 
as per the [official 
documentation](https://airflow.apache.org/docs/apache-airflow/stable/installation/installing-from-pypi.html#constraints-files).
   
   We attempted to upgrade from Airflow 2.3.4 to Airflow 2.6.1 on Python 3.10:
   ```
   pip install "apache-airflow[amazon, snowflake, slack, postgres]==2.6.1" 
--constraint 
"https://raw.githubusercontent.com/apache/airflow/constraints-2.6.1/constraints-3.10.txt";
   ```
   
   However, we encounter the following error:
   ```
   ERROR: Cannot install apache-airflow[amazon,postgres,slack,snowflake]==2.6.1 
because these package versions have conflicting dependencies.
   
   The conflict is caused by:
       apache-airflow[amazon,postgres,slack,snowflake] 2.6.1 depends on 
importlib-metadata<5.0.0 and >=1.7; python_version < "3.9"
       The user requested (constraint) importlib-metadata==6.6.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/topics/dependency-resolution/#dealing-with-dependency-conflicts
   ```
   
   
   When setting up an entirely new virtual environment and attempting install 
from scratch (both with and without providers) using the same command, the 
install finishes, but a similar error surfaces:
   ```
   ERROR: apache-airflow 2.6.1 has requirement importlib-metadata<5.0.0,>=1.7; 
python_version < "3.9", but you'll have importlib-metadata 6.6.0 which is 
incompatible.
   ```
   
   
   ### What you think should happen instead
   
   The constraints file should be able to install all dependencies without 
resolution-errors.
   
   ### How to reproduce
   
   Create and activate a new virtual environment on Python 3.10:
   ```
   python3 -m venv airflow26
   source ~/.venv/airflow26/bin/activate
   ```
   
   Attempt the Pip install of Airflow 2.6.1 on via the 3.10 constraints file:
   ```
   pip install "apache-airflow==2.6.1" --constraint 
"https://raw.githubusercontent.com/apache/airflow/constraints-2.6.1/constraints-3.10.txt";
   ```
   
   ### Operating System
   
   Ubuntu 20.04
   
   ### Versions of Apache Airflow Providers
   
   This error arises regardless of providers specified.
   
   ### Deployment
   
   Virtualenv installation
   
   ### Deployment details
   
   n/a
   
   ### Anything else
   
   This appears to be a recent issue with 2.6. We have never encountered this 
issue before with previous Airflow and Python versions.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to