无法通过pip安装气流

时间:2020-03-18 12:10:17

标签: python pip airflow

pip命令:

pip install google-cloud-storage apache-beam[gcp]==2.2.0 apache-airflow[gcp_api]==1.9.0 paramiko sshtunnel

错误:

ERROR: Command errored out with exit status 1:
     command: /home/cyao/Project/itcorp-airflow/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8hamva8l/apache-airflow/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8hamva8l/apache-airflow/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-8hamva8l/apache-airflow/pip-egg-info
         cwd: /tmp/pip-install-8hamva8l/apache-airflow/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-8hamva8l/apache-airflow/setup.py", line 102
        async = [
              ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

1 个答案:

答案 0 :(得分:0)

这是来自apache-airflow setup.py版本1.9.0的代码。在Python 3.7中,单词async变成了a reserved keyword,因此代码与Python 3.7+不兼容。

使用Python 3.6或使用更高版本的apache-airflow