#python #linux #ubuntu #airflow
#python #linux #ubuntu #воздушный поток
Вопрос:
Я пытаюсь установить airflow на Ubuntu.
Я настроил virtualenv с помощью python 3.5.3 и попытался установить airflow таким образом :
pip install -U pip setuptools wheel
amp;amp; pip install Cython
amp;amp; pip install pytz
amp;amp; pip install pyOpenSSL
amp;amp; pip install ndg-httpsclient
amp;amp; pip install pyasn1
amp;amp; pip install python-crontab
amp;amp; pip install crontabs
amp;amp; pip install py4j==0.10.7
amp;amp; pip install thrift-sasl==0.2.1
amp;amp; pip install git https://github.com/tobes/snakebite.git@python-3-long
amp;amp; pip install apache-airflow[crypto,devel_hadoop,mysql]==1.10.9
amp;amp; 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('"'"'rn'"'"', '"'"'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.
Кто-нибудь может мне помочь с этим, пожалуйста?
Ответ №1:
Используйте следующее, т.е. 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
amp;amp; pip install Cython
amp;amp; pip install pytz
amp;amp; pip install pyOpenSSL
amp;amp; pip install ndg-httpsclient
amp;amp; pip install pyasn1
amp;amp; pip install python-crontab
amp;amp; pip install crontabs
amp;amp; pip install py4j==0.10.7
amp;amp; pip install thrift-sasl==0.2.1
amp;amp; pip install git https://github.com/tobes/snakebite.git@python-3-long
amp;amp; pip install protobuf==3.11.3
amp;amp; 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
amp;amp; pip install werkzeug==0.16.1
Я думаю, что ошибка, которую вы видите, связана со старой версией Protobuf
Комментарии:
1. Спасибо за ваш ответ. Теперь у меня эта ошибка :
ERROR: Could not find a version that satisfies the requirement future<0.17,>=0.16.0 (from apache-airflow[crypto,devel-hadoop,mysql]) ERROR: No matching distribution found for future<0.17,>=0.16.0
2. Обновил ответ, попробуйте это
3. Теперь у меня есть предыдущая ошибка lmao
SyntaxError: Missing parentheses in call to 'print'
4. Я обновил ответ для использования
pip<20.3
. PIP выпустил 20.3, который содержит новый распознаватель5. Используйте
pip install -U 'pip<20.3'
— я тоже обновил ответ. Некоторым терминалам это не нравится без кавычек single / dobuel