Devstack installation - "ERROR: Command errored out with exit status 1"

Devstack installation - "ERROR: Command errored out with exit status 1"

我正在尝试在 Ubuntu 18.04 according to this tutorial 上安装 Devstack。我创建了用户 stack 和文件 local.conf,内容如下:

[[local|localrc]]
ADMIN_PASSWORD=secret
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

当我 运行 ./stack 时,出现以下错误:

Collecting alembic===1.4.2
  Using cached alembic-1.4.2.tar.gz (1.1 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3.6 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-bgfrloqz/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (39 lines):
  Traceback (most recent call last):
    File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/usr/local/lib/python3.6/dist-packages/pip/__main__.py", line 23, in <module>
      from pip._internal.cli.main import main as _main  # isort:skip # noqa
    File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/main.py", line 5, in <module>
      import locale
    File "/usr/lib/python3.6/locale.py", line 16, in <module>
      import re
    File "/usr/lib/python3.6/re.py", line 142, in <module>
      class RegexFlag(enum.IntFlag):
  AttributeError: module 'enum' has no attribute 'IntFlag'
  Error in sys.excepthook:
  Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 53, in apport_excepthook
      if not enabled():
    File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 24, in enabled
      import re
    File "/usr/lib/python3.6/re.py", line 142, in <module>
      class RegexFlag(enum.IntFlag):
  AttributeError: module 'enum' has no attribute 'IntFlag'

  Original exception was:
  Traceback (most recent call last):
    File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/usr/local/lib/python3.6/dist-packages/pip/__main__.py", line 23, in <module>
      from pip._internal.cli.main import main as _main  # isort:skip # noqa
    File "/usr/local/lib/python3.6/dist-packages/pip/_internal/cli/main.py", line 5, in <module>
      import locale
    File "/usr/lib/python3.6/locale.py", line 16, in <module>
      import re
    File "/usr/lib/python3.6/re.py", line 142, in <module>
      class RegexFlag(enum.IntFlag):
  AttributeError: module 'enum' has no attribute 'IntFlag'
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3.6 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-bgfrloqz/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
+inc/python:pip_install:1                  exit_trap
+./stack.sh:exit_trap:489                  local r=1
++./stack.sh:exit_trap:490                  jobs -p
+./stack.sh:exit_trap:490                  jobs=
+./stack.sh:exit_trap:493                  [[ -n '' ]]
+./stack.sh:exit_trap:499                  '[' -f '' ']'
+./stack.sh:exit_trap:504                  kill_spinner
+./stack.sh:kill_spinner:399               '[' '!' -z '' ']'
+./stack.sh:exit_trap:506                  [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:507                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:509                  type -p generate-subunit
+./stack.sh:exit_trap:510                  generate-subunit 1589211747 60 fail
+./stack.sh:exit_trap:512                  [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:515                  /usr/bin/python3.6 /opt/stack/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2020-05-11-154327.txt for details
+./stack.sh:exit_trap:524                  exit 1

缺少什么?

由于错误与 enum Python lib (AttributeError: module 'enum' has no attribute 'IntFlag') 有关,我听从了 Haken-lid in this question 的建议并且对我有用:

pip uninstall -y enum34