使用 init-runonce脚本创建一个 openstack云项目

  • Post author:
  • Post category:其他


source /etc/kolla/admin-openrc.sh

cd /usr/share/kolla-ansible

./init-runonce

报错内容

Traceback (most recent call last):

File “/usr/bin/openstack”, line 7, in <module>

from openstackclient.shell import main

File “/usr/lib/python2.7/site-packages/openstackclient/shell.py”, line 23, in <module>

from osc_lib import shell

File “/usr/lib/python2.7/site-packages/osc_lib/shell.py”, line 33, in <module>

from osc_lib.cli import client_config as cloud_config

File “/usr/lib/python2.7/site-packages/osc_lib/cli/client_config.py”, line 18, in <module>

from openstack.config import exceptions as sdk_exceptions

File “/usr/lib/python2.7/site-packages/openstack/__init__.py”, line 17, in <module>

import openstack.connection

File “/usr/lib/python2.7/site-packages/openstack/connection.py”, line 166, in <module>

from openstack.cloud import openstackcloud as _cloud

File “/usr/lib/python2.7/site-packages/openstack/cloud/openstackcloud.py”, line 35, in <module>

import dogpile.cache

File “/usr/lib/python2.7/site-packages/dogpile/cache/__init__.py”, line 1, in <module>

from .region import CacheRegion, register_backend, make_region # noqa

File “/usr/lib/python2.7/site-packages/dogpile/cache/region.py”, line 15, in <module>

from decorator import decorate

ImportError: cannot import name decorate

原因python 无法import  导入

解决方法:

/usr/lib/python2.7/site-packages/dogpile/cache/region.py  文件中的 from decorator import decorate  注释

转载于:https://www.cnblogs.com/ylj-linux/p/10115749.html