Ask Your Question
0

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

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

sl4dy gravatar image

Hi, I am installing OpenStack based on http://docs.openstack.org/developer/devstack/ (http://docs.openstack.org/developer/d...) 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 setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 20, in <module>
      File "/opt/stack/keystone/setup.py", line 29, in <module>
        pbr=True)
      File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 272, in __init__
        _Distribution.__init__(self,attrs)
      File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 327, in finalize_options
        ep.load()(self, ep.name, value)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2380, in load
        return self.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2386, in resolve
        module = __import__(self.module_name, fromlist=['__name__'], level=0)
      File "/usr/lib/python2.7/site-packages/pbr/core.py", line 55, in <module>
        from pbr import util
      File "/usr/lib/python2.7/site-packages/pbr/util.py", line 86, in <module>
        import pbr.hooks
      File "/usr/lib/python2.7/site-packages/pbr/hooks/__init__.py", line 16, in <module>
        from pbr.hooks import backwards
      File "/usr/lib/python2.7/site-packages/pbr/hooks/backwards.py", line 17, in <module>
        from pbr import packaging
      File "/usr/lib/python2.7/site-packages/pbr/packaging.py", line 43, in <module>
        from pbr import testr_command
      File "/usr/lib/python2.7/site-packages/pbr/testr_command.py", line 151, in <module>
        from testrepository import commands
      File "/usr/lib/python2.7/site-packages/testrepository/commands/__init__.py", line 40, in <module>
        import subunit
      File "/usr/lib/python2.7/site-packages/subunit/__init__.py", line 130, in <module>
        from testtools import content, content_type, ExtendedToOriginalDecorator
      File "/usr/lib/python2.7/site-packages/testtools/__init__.py", line 65, in <module>
        from testtools.runtest import (
      File "/usr/lib/python2.7/site-packages/testtools/runtest.py", line 12, in <module>
        from testtools.testresult import ExtendedToOriginalDecorator
      File "/usr/lib/python2.7/site-packages/testtools/testresult/__init__.py", line 28, in <module>
        from testtools.testresult.real import (
      File "/usr/lib/python2.7/site-packages/testtools/testresult/real.py", line 35, in <module>
        from pyrsistent import PClass, field, pmap_field, pset_field, pmap, pset, thaw
      File "/usr/lib64/python2.7/site-packages/pyrsistent/__init__.py", line 3, in <module>
        from pyrsistent._pmap import pmap, m, PMap
      File "/usr/lib64/python2.7/site-packages/pyrsistent/_pmap.py", line 4, in <module>
        from pyrsistent._pvector import pvector
      File "/usr/lib64/python2.7/site-packages/pyrsistent/_pvector.py", line 414, in <module>
        @six.add_metaclass ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

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

Hi,

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

Regards,

BigM

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

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

Seen: 2,167 times

Last updated: Feb 27 '16