在Mac上使用python3进行气流安装错误

时间:2019-06-20 19:42:41

标签: installation airflow

我正在使用python版本 3.7.3 安装气流,并使用commmand pip install apache-airflow,但出现以下错误。 请帮助我解决这个问题。

 Installing build dependencies ... error
  ERROR: Complete output from command /anaconda3/bin/python /anaconda3/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/gn/62wd4sgd3d3153jxk1l4kv6m0000gn/T/pip-build-env-x6yn4ceb/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel:
  ERROR: Traceback (most recent call last):
    File "/anaconda3/lib/python3.7/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/anaconda3/lib/python3.7/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/anaconda3/lib/python3.7/site-packages/pip/__main__.py", line 16, in <module>
      from pip._internal import main as _main  # isort:skip # noqa
    File "/anaconda3/lib/python3.7/site-packages/pip/_internal/__init__.py", line 4, in <module>
      import locale
    File "/anaconda3/lib/python3.7/locale.py", line 16, in <module>
      import re
    File "/anaconda3/lib/python3.7/re.py", line 143, in <module>
      class RegexFlag(enum.IntFlag):
  AttributeError: module 'enum' has no attribute 'IntFlag'
  ----------------------------------------
ERROR: Command "/anaconda3/bin/python /anaconda3/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/gn/62wd4sgd3d3153jxk1l4kv6m0000gn/T/pip-build-env-x6yn4ceb/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel" failed with error code 1 in None

2 个答案:

答案 0 :(得分:0)

尝试通过brew安装气流和其他依赖物。 Brew是Mac OS的存储库管理器,类似于Linux中的apt-get

答案 1 :(得分:0)

卸载enum34(如果已安装)。

运行:

pip uninstall enum34

这是由于我们对气流的依赖性所致。