0

I am using PyCharm and created a virtual environment with python3. In that venv, I am getting below error while trying to install airflow. What do I need to do in order to run airflow in python venv?

pip install apache-airflow

Installing build dependencies ... error
 ERROR: Complete output from command /Users/***/venv/bin/python /Users/***/venv/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/p4/dd2h8vlx65z2v2z7vmjy9gtc0000gn/T/pip-build-env-sp6buhf3/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 "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 193, in _run_module_as_main
     "__main__", mod_spec)
   File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", line 85, in _run_code
     exec(code, run_globals)
   File "/Users/***/venv/lib/python3.7/site-packages/pip/__main__.py", line 16, in <module>
     from pip._internal import main as _main  # isort:skip # noqa
   File "/Users/***/venv/lib/python3.7/site-packages/pip/_internal/__init__.py", line 4, in <module>
     import locale
   File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/locale.py", line 16, in <module>
     import re
   File "/usr/local/Cellar/python/3.7.2_2/Frameworks/Python.framework/Versions/3.7/lib/python3.7/re.py", line 143, in <module>
     class RegexFlag(enum.IntFlag):
 AttributeError: module 'enum' has no attribute 'IntFlag'
ERROR: Command "/Users/***/venv/bin/python /Users/***/venv/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/p4/dd2h8vlx65z2v2z7vmjy9gtc0000gn/T/pip-build-env-sp6buhf3/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
conetfun
  • 1,605
  • 4
  • 17
  • 38
  • Actually, this answer might be more specific to PyCharm https://stackoverflow.com/a/54241795/245915 – nofinator May 13 '19 at 13:51
  • @nofinator - The other answer talks about "Disabling App Engine Support in PyCharm" but I don't get an option like that in PyCharm. Do you know where to find it? – conetfun May 13 '19 at 14:05
  • @nofinator - Also, I tried it running outside pycharm and still get the same error. – conetfun May 13 '19 at 14:09
  • 1
    Okay, as suggested in other answer, pip uninstall enum34 solved the issue. Thanks – conetfun May 13 '19 at 14:14

0 Answers0