gpt4 book ai didi

python - Airflow 安装问题 SyntaxError : Missing parentheses in call to 'print'

转载 作者:行者123 更新时间:2023-12-04 19:07:45 25 4
gpt4 key购买 nike

我试图在 Ubuntu 上安装 Airflow 。
我用 python 3.5.3 设置了一个 virtualenv 并尝试以这种方式安装 Airflow :

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
但我有这个错误
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.
任何人都可以帮我解决这个问题吗?

最佳答案

使用以下内容,即 https://github.com/apache/airflow/blob/constraints-1.10.9/constraints-3.5.txt (Airflow 1.10.9 和 Python 3.5 的约束文件):

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

关于python - Airflow 安装问题 SyntaxError : Missing parentheses in call to 'print' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65089903/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com