Ask Your Question

Installation of OpenStack fails with AttributeError: 'module' object has no attribute 'add_metaclass'

asked 2016-02-17 09:12:30 -0600

sl4dy gravatar image

Hi, I am installing OpenStack based on ( steps, the "All-In-One Single VM" variant.

I am running CentOS Linux release 7.1.1503 (Core) :

Linux msl-ic3-el7 3.10.0-229.11.1.el7.x86_64 #1 SMP Thu Aug 6 01:06:18 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

I always get following error during installation:

+ local 'xtrace=set -o xtrace'
+ set +o xtrace
+ sudo -H http_proxy= https_proxy= no_proxy= PIP_FIND_LINKS=file:///opt/stack/.wheelhouse /bin/pip install -e /opt/stack/keystone
Obtaining file:///opt/stack/keystone
    Complete output from command python egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/opt/stack/keystone/", line 29, in <module>
      File "/usr/lib64/python2.7/distutils/", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/site-packages/setuptools/", line 272, in __init__
      File "/usr/lib64/python2.7/distutils/", line 287, in __init__
      File "/usr/lib/python2.7/site-packages/setuptools/", line 327, in finalize_options
        ep.load()(self,, value)
      File "/usr/lib/python2.7/site-packages/pkg_resources/", line 2380, in load
        return self.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/", line 2386, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/usr/lib/python2.7/site-packages/pbr/", line 55, in <module>
        from pbr import util
      File "/usr/lib/python2.7/site-packages/pbr/", line 86, in <module>
        import pbr.hooks
      File "/usr/lib/python2.7/site-packages/pbr/hooks/", line 16, in <module>
        from pbr.hooks import backwards
      File "/usr/lib/python2.7/site-packages/pbr/hooks/", line 17, in <module>
        from pbr import packaging
      File "/usr/lib/python2.7/site-packages/pbr/", line 43, in <module>
        from pbr import testr_command
      File "/usr/lib/python2.7/site-packages/pbr/", line 151, in <module>
        from testrepository import commands
      File "/usr/lib/python2.7/site-packages/testrepository/commands/", line 40, in <module>
        import subunit
      File "/usr/lib/python2.7/site-packages/subunit/", line 130, in <module>
        from testtools import content, content_type, ExtendedToOriginalDecorator
      File "/usr/lib/python2.7/site-packages/testtools/", line 65, in <module>
        from testtools.runtest import (
      File "/usr/lib/python2.7/site-packages/testtools/", line 12, in <module>
        from testtools.testresult import ExtendedToOriginalDecorator
      File "/usr/lib/python2.7/site-packages/testtools/testresult/", line 28, in <module>
        from testtools.testresult.real import (
      File "/usr/lib/python2.7/site-packages/testtools/testresult/", line 35, in <module>
        from pyrsistent import PClass, field, pmap_field, pset_field, pmap, pset, thaw
      File "/usr/lib64/python2.7/site-packages/pyrsistent/", line 3, in <module>
        from pyrsistent._pmap import pmap, m, PMap
      File "/usr/lib64/python2.7/site-packages/pyrsistent/", line 4, in <module>
        from pyrsistent._pvector import pvector
      File "/usr/lib64/python2.7/site-packages/pyrsistent/", line 414, in <module>
        @six.add_metaclass ...
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-02-27 10:33:58 -0600


I have Centos 7 and had the exact same error.

It turned out to caused by "six". (Note the last but one line of your log - @six.add_metaclass...).

Even though the latest version (1.10) was installed. It still seemed to be using an older version???

Try checking the version:

$ python
>>> import six
>>> print six.__version__

It would be interesting to see what version you get. Mine certainly wasn't 1.10!!

And see what pip thinks is installed:

$ pip show six

Un-installing and re-installing worked and I could continue the Devstack deployment.

$ sudo pip uninstall six
$ sudo pip install six

Good luck. Hope it works for you



edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2016-02-17 09:12:30 -0600

Seen: 2,824 times

Last updated: Feb 27 '16