离线安装Apache Airflow 2.7.3时build依赖安装失败的问题求助
离线安装Apache Airflow 2.7.3时build依赖安装失败的问题求助
大家好,我正在尝试离线安装Apache Airflow 2.7.3,虽然已经研究过pip download、依赖清单文件以及约束文件的相关用法,但还是没能成功完成安装。下面是我用来复现问题的完整脚本:
AIRFLOW_VERSION=2.7.3 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-$PYTHON_VERSION.txt" # 下载约束文件到本地后续使用 curl -L $CONSTRAINT_URL --output constraints-$AIRFLOW_VERSION-$PYTHON_VERSION.txt # 创建存储下载包的文件夹 mkdir pip-download && cd pip-download # 带约束条件下载依赖包 pip download "apache-airflow==$AIRFLOW_VERSION" --constraint ../constraints-$AIRFLOW_VERSION-$PYTHON_VERSION.txt # 本地离线安装,带约束条件 pip install apache-airflow==$AIRFLOW_VERSION --no-index --find-links=. --constraint ../constraints-$AIRFLOW_VERSION-$PYTHON_VERSION.txt
运行这个脚本后,我遇到了以下错误:
Processing ./connexion-2.14.2-py2.py3-none-any.whl (from apache-airflow==2.7.3) Processing ./cron_descriptor-1.4.0.tar.gz (from apache-airflow==2.7.3) Installing build dependencies ... error error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> [4 lines of output] Looking in links: . Processing ./setuptools-69.0.2-py3-none-any.whl ERROR: Could not find a version that satisfies the requirement wheel (from versions: none) ERROR: No matching distribution found for wheel [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × pip subprocess to install build dependencies did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. (env) [airflow@89a126f62807 airflow]$
我想知道自己哪里操作错了?另外,我用在线安装的方式是可以成功的,对应的命令如下:
AIRFLOW_VERSION=2.7.3 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-$PYTHON_VERSION.txt" pip install apache-airflow==$AIRFLOW_VERSION --constraint $CONSTRAINT_URL
测试结果也显示安装成功:
(env) [airflow@89a126f62807 airflow]$ airflow version 2.7.3 (env) [airflow@89a126f62807 airflow]$
备注:内容来源于stack exchange,提问作者zaidwaqi
相关产品推荐
相关产品推荐

