简体   繁体   中英

'module' object has no attribute '__version__' during openstack /devstack installation

I have tried updating pip but it didn't helped. How to get past this error.

+./stack.sh:main:1033                      create_keystone_accounts
+lib/keystone:create_keystone_accounts:372  local admin_tenant
++lib/keystone:create_keystone_accounts:373  openstack project show admin -f value -c id
Traceback (most recent call last):
  File "/usr/local/bin/openstack", line 7, in <module>
    from openstackclient.shell import main
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/shell.py", line 32, in <module>
    from openstackclient.common import clientmanager
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/common/clientmanager.py", line 293, in <module>
    'openstack.cli.base',
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/common/clientmanager.py", line 264, in get_plugin_modules
    __import__(ep.module_name)
  File "/usr/local/lib/python2.7/dist-packages/openstackclient/network/client.py", line 16, in <module>
    from openstack import connection
  File "/usr/local/lib/python2.7/dist-packages/openstack/connection.py", line 68, in <module>
    from openstack import session as _session
  File "/usr/local/lib/python2.7/dist-packages/openstack/session.py", line 29, in <module>
    DEFAULT_USER_AGENT = "openstacksdk/%s" % openstack.__version__
AttributeError: 'module' object has no attribute '__version__'
+lib/keystone:create_keystone_accounts:373  admin_tenant=
+lib/keystone:create_keystone_accounts:1   exit_trap
+./stack.sh:exit_trap:474                  local r=1
++./stack.sh:exit_trap:475                  jobs -p
+./stack.sh:exit_trap:475                  jobs=
+./stack.sh:exit_trap:478                  [[ -n '' ]]
+./stack.sh:exit_trap:484                  kill_spinner
+./stack.sh:kill_spinner:370               '[' '!' -z '' ']'
+./stack.sh:exit_trap:486                  [[ 1 -ne 0 ]]
+./stack.sh:exit_trap:487                  echo 'Error on exit'
Error on exit
+./stack.sh:exit_trap:488                  generate-subunit 1481647878 224 fail
+./stack.sh:exit_trap:489                  [[ -z /opt/stack/logs ]]
+./stack.sh:exit_trap:492                  /home/tcs467518/devstack/tools/worlddump.py -d /opt/stack/logs
World dumping... see /opt/stack/logs/worlddump-2016-12-13-165502.txt for details
+./stack.sh:exit_trap:498                  exit 1

Tried reinstalling pip :

    /usr/local/bin/pip -V
pip 9.0.1 from /usr/local/lib/python2.7/dist-packages (python 2.7)

i met the same issue on stable/mitaka version. after upgraded openstacksdk to 0.9.5, the issue is gone. https://bugs.launchpad.net/python-openstacksdk/+bug/1588823 https://review.openstack.org/#/c/325088/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM