Ask Your Question

Installation of devstack on RHEL

asked 2013-10-08 07:08:35 -0500

Ninad gravatar image


I am trying to install devstack on RHEL 6. When I run, it prints some line and ends after giving error. I think I have resolved all required dependancies. Here is the error log.

+ sudo rm -rf /tmp/pip-build.a4yNk
++ python -c 'import site; import os; print os.linesep.join(site.getsitepackages())'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'module' object has no attribute 'getsitepackages'
++ failed
++ local r=1
+++ jobs -p
++ kill
++ set +o xtrace

Please help.



edit retag flag offensive close merge delete



I think it's because RHEL6 uses Python version 2.6. The getsitepackages method is only available from Python version 2.7 and higher. The script that calls the method is devstack/tools/ has some hacks for RHEL6, but this isn't one of them.

dkanbier gravatar imagedkanbier ( 2013-10-08 08:52:48 -0500 )edit

I came to know about it. I installed Python 2.7. But Still my red hat uses python 2.6. Even I copied & replaced, site.pyc & site.pyo files from Python 2.7 to Python 2.6 files (& I didn't take backup of Python 2.6 files...). But it didn't work.

Ninad gravatar imageNinad ( 2013-10-09 00:32:48 -0500 )edit

2 answers

Sort by ยป oldest newest most voted

answered 2013-10-08 09:17:49 -0500

larsks gravatar image

As dkanbier said, Python on RHEL6 does not have the site.getsitepackages method. I think if you replace:

SITE_DIRS=$(python -c "import site; import os; print os.linesep.join(site.getsitepackages())")


    python -c "import sys; import site; import os; print (hasattr(site, 'getsitepackages') and os.linesep.join(site.getsitepackages()) or os.linesep.join(sys.path))"

That you'll end up with something that does the right thing.

edit flag offensive delete link more


Thanks for reply. But in which file I need to replace? Because I was trying to run I checked it for above.

Ninad gravatar imageNinad ( 2013-10-09 00:35:39 -0500 )edit

hey thanks..! I changed it. And now above mentioned error is not displayed. but now am getting new error. The new error is: + sudo chmod +r '/usr/lib/python2.6/site-packages/prettytable-0.7.2*/*' chmod: cannot access `/usr/lib/python2.6/site-packages/prettytable-0.7.2*/*': No such file or directory ++ failed

Ninad gravatar imageNinad ( 2013-10-09 03:10:19 -0500 )edit

I think this is because RHEL6.4 uses python2.6 and devstack requires python2.7. I am not sure.

Ninad gravatar imageNinad ( 2013-10-09 03:15:52 -0500 )edit

answered 2013-10-16 14:27:43 -0500

Louis Brooks gravatar image

updated 2013-10-16 14:30:14 -0500

Hi Ninad, Not sure if you have solved this yet or not but I had the same problem.

I replaced:

SITE_DIRS=$(python -c "import site; import os; print os.linesep.join(site.getsitepackages())")


SITE_DIRS=$(python -c "import sys; import site; import os; print (hasattr(site, 'getsitepackages') and os.linesep.join(site.getsitepackages()) or os.linesep.join(sys.path))")

in tools/ and got the:

 + sudo chmod +r '/usr/lib/python2.6/site-packages/prettytable-0.7.2*/*' chmod: cannot access `/usr/lib/python2.6/site-packages/prettytable-0.7.2*/*':


All I done to resolve this error was to go to /usr/lib/python2.6/site-packages and find the directory of the prettytable package my python implementation was using (in my case prettytable-0.6.1) and replace the following code in tools/

if [[ -r $dir/ ]]; then
        sudo chmod +r $dir/prettytable-0.7.2*/*


if [[ -r $dir/ ]]; then
    sudo chmod +r $dir/prettytable-0.6.1*/*

Obviously this isn't a fix but it was all I needed to do to get a running OpenStack implementation. I would say you are probably right with regards to Python being at an older verion being the issue...

edit flag offensive delete link more


Hey Louis.. Thanks alot for help.. It worked..! One more thing, after editing as per your instruction my RHEL got restarted. This was because of the "sudo service messagebus restart" in . I commented that, and now will try for Thanks again.

Ninad gravatar imageNinad ( 2013-10-17 01:39:39 -0500 )edit

It worked. But again with new issue..! During execution of, it started flooding rsyslog messages to terminal window. Now am unable to do anything on terminal. Can't even restart cinder or nova service. If I stop rsyslog service then those services got failed. Trying to solve..

Ninad gravatar imageNinad ( 2013-10-18 03:41:18 -0500 )edit

Done with the issue.. In localrc file, change SYSLOG=False. This will solve the issue. Thanks allot Louis, Larsks and Dkanbier for the help.

Ninad gravatar imageNinad ( 2013-10-22 05:08:10 -0500 )edit

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


Asked: 2013-10-08 07:08:35 -0500

Seen: 1,732 times

Last updated: Oct 16 '13