我正在尝试在 Mac 操作系统中安装 Airflow。 我安装了 python 3.7.3。 我做了以下 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/
最佳答案
- 从Python 3.7开始,async是用于协程的“保留”关键字(尽管 [Python]: PEP 492 -- Coroutines with async and await syntax 指>v3.5)
- [PyPI]: Apache-AirFlow 1.9.0另一方面,是否与Python 3.4(已达到生命周期结束的版本)兼容
要解决该错误,只需使用较新的 AirFlow 版本(建议使用最新版本),从 v1.10 开始.4(这是第一个st与Python 3.7兼容的版本)。
关于python - Airflow 安装错误 :"python setup.py egg_info"失败,错误代码为 1”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58213521/