首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >气流安装问题SyntaxError:调用“打印”时缺少括号

气流安装问题SyntaxError:调用“打印”时缺少括号
EN

Stack Overflow用户
提问于 2020-12-01 11:45:55
回答 1查看 262关注 0票数 0

我试着在Ubuntu上安装气流。

我用python 3.5.3建立了一个虚拟环境,并试图以这种方式安装气流:

代码语言:javascript
复制
pip install -U pip setuptools wheel \
    && pip install Cython \
    && pip install pytz \
    && pip install pyOpenSSL \
    && pip install ndg-httpsclient \
    && pip install pyasn1 \
    && pip install python-crontab \
    && pip install crontabs \
    && pip install py4j==0.10.7\
    && pip install thrift-sasl==0.2.1\
    && pip install git+https://github.com/tobes/snakebite.git@python-3-long \
    && pip install apache-airflow[crypto,devel_hadoop,mysql]==1.10.9 \
    && pip install werkzeug==0.16.1

但是我有这个错误

代码语言:javascript
复制
Using cached protobuf-2.5.0.tar.gz (68 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/arslane/airflow/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cnsf0k86/protobuf_49e7336cd75a470cbb1c2c76bfa70896/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cnsf0k86/protobuf_49e7336cd75a470cbb1c2c76bfa70896/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-pip-egg-info-jd672mun
         cwd: /tmp/pip-install-cnsf0k86/protobuf_49e7336cd75a470cbb1c2c76bfa70896/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-cnsf0k86/protobuf_49e7336cd75a470cbb1c2c76bfa70896/setup.py", line 52
        print "Generating %s..." % output
                               ^
    SyntaxError: Missing parentheses in call to 'print'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

有人能帮我一下吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-12-01 11:52:49

使用下面的https://github.com/apache/airflow/blob/constraints-1.10.9/constraints-3.5.txt (气流1.10.9和Python3.5的约束文件):

代码语言:javascript
复制
pip install -U 'pip<20.3' setuptools wheel \
    && pip install Cython \
    && pip install pytz \
    && pip install pyOpenSSL \
    && pip install ndg-httpsclient \
    && pip install pyasn1 \
    && pip install python-crontab \
    && pip install crontabs \
    && pip install py4j==0.10.7\
    && pip install thrift-sasl==0.2.1\
    && pip install git+https://github.com/tobes/snakebite.git@python-3-long \
    && pip install protobuf==3.11.3
    && pip install apache-airflow[crypto,devel_hadoop,mysql]==1.10.9 -c https://github.com/apache/airflow/blob/constraints-1.10.9/constraints-3.5.txt \
    && pip install werkzeug==0.16.1

我认为你看到的错误是因为Protobuf的旧版本。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/65089903

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档