【发布时间】:2018-08-14 16:42:12
【问题描述】:
根据AirFlow Offical documentation,我尝试了以下方法
# 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
但面对
[2018-08-12 11:43:25,683] {__init__.py:45} INFO - Using executor SequentialExecutor
____________ _____________
____ |__( )_________ __/__ /________ __
____ /| |_ /__ ___/_ /_ __ /_ __ \_ | /| / /
___ ___ | / _ / _ __/ _ / / /_/ /_ |/ |/ /
_/_/ |_/_/ /_/ /_/ /_/ \____/____/|__/
/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.cache is deprecated, use flask_cache instead.
.format(x=modname), ExtDeprecationWarning
Traceback (most recent call last):
File "/usr/local/bin/airflow", line 27, in <module>
args.func(args)
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airflow/bin/cli.py", line 678, in webserver
app = cached_app(conf)
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airflow/www/app.py", line 161, in cached_app
app = create_app(config)
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airflow/www/app.py", line 59, in create_app
from airflow.www import views
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airflow/www/views.py", line 29, in <module>
import bleach
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bleach/__init__.py", line 8, in <module>
from bleach.linkifier import (
File "/usr/local/Cellar/python3/3.6.2/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/bleach/linkifier.py", line 7, in <module>
from html5lib.filters.sanitizer import allowed_protocols
ImportError: cannot import name 'allowed_protocols'
【问题讨论】:
-
@tobi6 感谢您的关注,在我发布此问题后,我尝试 pip uninstall apache-airflow ,尝试安装 pip install airflow ,一切正常。 (气流在气流的 1.8 版中),我们可以得出结论,它不取决于我的环境,而是取决于 apache-airflow 上的包,仅供参考,我的 ptyhon 版本是 3.6,我没有 anaconda,并且没有错误正在安装中。
标签: airflow