Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Airflow installation error:"python setup.py egg_info" failed with error code 1"

Tags:

python

airflow

I am trying to install airflow in Mac OS. I have python 3.7.3 installed. I did the following pip install apache-airflow==1.9.0

Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/rh/4jxb065x3dl3vf1hr084qz100000gn/T/pip-install-oeuegs9g/apache-airflow/setup.py", line 102
        async = [
              ^
    SyntaxError: invalid syntax

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/rh/4jxb065x3dl3vf1hr084qz100000gn/T/pip-install-oeuegs9g/apache-airflow/
like image 238
Ayan Biswas Avatar asked Apr 01 '26 05:04

Ayan Biswas


1 Answers

  • Starting with Python 3.7, async is a "reserved" keyword used for coroutines (although [Python]: PEP 492 -- Coroutines with async and await syntax refers to v3.5)
  • [PyPI]: Apache-AirFlow 1.9.0 on the other hand, is Python 3.4 (a version that reached its end-of-life) compatible

To get past the error, simply use a newer AirFlow version (recommended using the latest), starting with v1.10.4 (which is the 1st one compatible with Python 3.7).

like image 135
CristiFati Avatar answered Apr 02 '26 18:04

CristiFati



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!