airflow 安装失败解决方案

问题 1

pip直接安装airflow的时候会报错

Quick Start
The installation is quick and straightforward.

# airflow needs a home, ~/airflow is the default,
# but you can lay foundation somewhere else if you prefer
# (optional)
export AIRFLOW_HOME=~/airflow

# install from pypi using pip
pip install apache-airflow

# initialize the database
airflow initdb

# start the web server, default port is 8080
airflow webserver -p 8080

# start the scheduler
airflow scheduler

# visit localhost:8080 in the browser and enable the example dag in the home page

出错信息

    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-wB2hqV/apache-airflow/setup.py", line 393, in <module>
        do_setup()
      File "/tmp/pip-build-wB2hqV/apache-airflow/setup.py", line 258, in do_setup
        verify_gpl_dependency()
      File "/tmp/pip-build-wB2hqV/apache-airflow/setup.py", line 49, in verify_gpl_dependency
        raise RuntimeError("By default one of Airflow's dependencies installs a GPL "
    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
    
    ----------------------------------------

解决方案

环境变量问题

SLUGIFY_USES_TEXT_UNIDECODE=yes pip install apache-airflow==1.10.0

ref:
https://stackoverflow.com/questions/52203441/error-while-install-airflow-by-default-one-of-airflows-dependencies-installs-a

最简单安装方法

sudo docker run -it  astronomerio/airflow bash
airflow initdb
airflow server
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容