我正在通过命令安装 airflow
:
python3 setup.py 安装
。它接收需求文件 requirements/athena.txt
,即:
apache-airflow[celery,postgres,hive,password,crypto]==1.10.1
我遇到了一个错误:
RuntimeError: By default one of Airflow's dependencies installs a GPL dependency (unidecode). To avoid this dependency set SLUGIFY_USES_TEXT_UNIDECODE=yes in your environment when you install or upgrade Airflow. To force installing the GPL version set AIRFLOW_GPL_UNIDECODE
为消除此错误,我设置了 export SLUGIFY_USES_TEXT_UNIDECODE=yes
和 export AIRFLOW_GPL_UNIDECODE=yes
。但是,运行命令 python3 setup.py install
仍然给出相同的错误,没有任何改变。检查环境变量:
➜ athena-py git:(pyspark-DataFrameStatFunctions) echo $SLUGIFY_USES_TEXT_UNIDECODE
yes
➜ athena-py git:(pyspark-DataFrameStatFunctions) echo $AIRFLOW_GPL_UNIDECODE
yes
最佳答案
Airflow 还没有正式支持 python3.7。
我认为 pip
可能没有获取您的环境变量。您可以在 shell 上尝试以下命令,以确保它选择您提供的选项。
AIRFLOW_GPL_UNIDECODE=yes pip3 install "apache-airflow[celery,postgres,hive,password,crypto]==1.10.1"```
关于python - 即使在设置 SLUGIFY_USES_TEXT_UNIDECODE 和 AIRFLOW_GPL_UNIDECODE 后也无法安装 Airflow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55240037/