Ask Your Question

[Juno] devstack install failure: AttributeError: 'module' object has no attribute 'wraps'

asked 2014-12-16 02:43:06 -0500

tvbinstinct gravatar image

updated 2014-12-16 12:03:27 -0500

smaffulli gravatar image

The error was thrown out when run:

/opt/stack/keystone/bin/keystone-manage db_syn

Traceback (most recent call last):
  File "/opt/stack/keystone/bin/keystone-manage", line 30, in <module>
    from keystone import cli
  File "/opt/stack/keystone/keystone/", line 31, in <module>
    from keystone import token
  File "/opt/stack/keystone/keystone/token/", line 15, in <module>
    from keystone.token import controllers  # noqa
  File "/opt/stack/keystone/keystone/token/", line 31, in <module>
    from keystone.token import provider
  File "/opt/stack/keystone/keystone/token/", line 37, in <module>
    from keystone.token import persistence
  File "/opt/stack/keystone/keystone/token/persistence/", line 13, in <module>
    from keystone.token.persistence.core import *  # noqa
  File "/opt/stack/keystone/keystone/token/persistence/", line 44, in <module>
    class PersistenceManager(manager.Manager):
  File "/opt/stack/keystone/keystone/token/persistence/", line 58, in PersistenceManager
  File "/opt/stack/keystone/keystone/openstack/common/", line 128, in __call__
AttributeError: 'module' object has no attribute 'wraps'

Looks like something related to package six. But I have the latest installed:

$ pip show six
Name: six
Version: 1.8.0
Location: /usr/local/lib/python2.7/dist-packages
edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted

answered 2014-12-16 02:59:10 -0500

tvbinstinct gravatar image

It turns out that I have two versions of package six existing in the system.

version 1.5.2 at /usr/lib/python2.7/dist-packages


version 1.8.0 at /usr/local/lib/python2.7/dist-packages

Somehow version 1.5.2 is the one used and thus the AttributeError. I can fix the install by removing six.* from /usr/lib/python2.7/dist-packages/

Don't know whether /usr/lib/ or /usr/local/lib/ is used. It's probably a general python problem.

My env is Ubuntu Desktop 14.04

edit flag offensive delete link more



Got a little bit deeper on this. My /usr/local/lib/python2.7/dist-packages/easy-install.pth contains /usr/lib/python2.7/dist-packages in it. I will cause the issue I saw but don't know how it got there.

tvbinstinct gravatar imagetvbinstinct ( 2014-12-16 04:16:52 -0500 )edit

Saw same issue on my setup as tvbinstinct. Thanks for posting what you found here.

Shreyansh gravatar imageShreyansh ( 2015-02-11 02:20:51 -0500 )edit

answered 2016-12-21 16:16:01 -0500

Edson Barbosa gravatar image

I get the error bellow 'no attribute version' trying to install mitaka devstack on ubuntu 16.04

attributeError: 'module' object has no attribute '__version__'

work around:

edit the file /usr/local/lib/python2.7/dist-packages/openstack/ and remove the .__version__ at line 29.

DEFAULT_USER_AGENT = "openstacksdk/%s" % openstack.__version__

DEFAULT_USER_AGENT = "openstacksdk/%s" % openstack

edit flag offensive delete link more


Edson Barbosa ! I have verified your workaround and it worked well to me. Thanks

Rickyhai gravatar imageRickyhai ( 2017-01-04 00:54:33 -0500 )edit

answered 2014-12-16 03:58:02 -0500

kini gravatar image

This problem is solved to remove six using apt-get

sudo apt-get autoremove six

and run ./

edit flag offensive delete link more


Or on 14.04:

sudo apt-get autoremove python-six
Rushi Agrawal gravatar imageRushi Agrawal ( 2015-06-04 05:38:53 -0500 )edit

answered 2014-12-16 06:29:02 -0500

Bharath gravatar image

Have a look at this, it resolved the same issue I had earlier.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2014-12-16 02:43:06 -0500

Seen: 11,217 times

Last updated: Dec 16 '14