## 2.使用约束文件进行安装
官网给出的文件内容:
AIRFLOW_VERSION=2.7.2
Extract the version of Python you have installed. If you’re currently using a Python version that is not supported by Airflow, you may want to set this manually.
See above for supported versions.
PYTHON_VERSION=“$(python --version | cut -d " " -f 2 | cut -d “.” -f 1-2)”
CONSTRAINT_URL=“https://raw.githubusercontent.com/apache/airflow/constraints-AIRFLOW_VERSION/constraints−{AIRFLOW\_VERSION}/constraints-AIRFLOW_VERSION/constraints−{PYTHON_VERSION}.txt”
For example this would install 2.7.2 with python 3.8: https://raw.githubusercontent.com/apache/airflow/constraints-2.7.2/constraints-3.8.txt
pip install “apache-airflow==AIRFLOW_VERSION"−−constraint"{AIRFLOW\_VERSION}" --constraint "AIRFLOW_VERSION"−−cons