Ask Your Question

python-openstackclient not working 'ImportError: No module named queue'

asked 2020-06-23 06:40:36 -0500

shrey_chauhan gravatar image

updated 2020-06-23 08:03:57 -0500

eblock gravatar image

Tried installing python-openstackclient==3.14.3, but the python client is giving error....tried the latest version as well


[root@test-001test]# openstack
Traceback (most recent call last):
  File "/usr/bin/openstack", line 5, in <module>
    from import main
  File "/usr/lib/python2.7/site-packages/openstackclient/", line 23, in <module>
    from osc_lib import shell
  File "/usr/lib/python2.7/site-packages/osc_lib/", line 33, in <module>
    from osc_lib.cli import client_config as cloud_config
  File "/usr/lib/python2.7/site-packages/osc_lib/cli/", line 18, in <module>
    from openstack.config import exceptions as sdk_exceptions
  File "/usr/lib/python2.7/site-packages/openstack/", line 16, in <module>
    import openstack.config
  File "/usr/lib/python2.7/site-packages/openstack/config/", line 17, in <module>
    from openstack.config.loader import OpenStackConfig  # noqa
  File "/usr/lib/python2.7/site-packages/openstack/config/", line 33, in <module>
    from openstack.config import cloud_region
  File "/usr/lib/python2.7/site-packages/openstack/config/", line 44, in <module>
    from openstack import proxy
  File "/usr/lib/python2.7/site-packages/openstack/", line 24, in <module>
    from openstack import resource
  File "/usr/lib/python2.7/site-packages/openstack/", line 49, in <module>
    from openstack import utils
  File "/usr/lib/python2.7/site-packages/openstack/", line 13, in <module>
    import queue
ImportError: No module named queue

Can someone help with this? stuck here


edit retag flag offensive close merge delete


Seems like an old version of openstackclient, can you share more information about your environment and which openstack version you're using?

eblock gravatar imageeblock ( 2020-06-23 08:06:30 -0500 )edit

I have python2.7, centos 7 I tried installing using 'pip install python-openstackclient' it got installed but i am getting this error

shrey_chauhan gravatar imageshrey_chauhan ( 2020-06-24 04:42:22 -0500 )edit

3 answers

Sort by » oldest newest most voted

answered 2020-08-03 12:32:41 -0500

João Antonio gravatar image

Python 2.7.17 Ubuntu 18.04.2 LTS

In my case, I altered the files and putting "import Queue as queue".

Note: Remember that the uppercase Q

vim /home/myuser/.local/lib/python2.7/site-packages/openstack/

#import queue
import Queue as queue

vim /home/myuser/.local/lib/python2.7/site-packages/openstack/cloud/

#import queue
import Queue as queue
edit flag offensive delete link more

answered 2020-06-27 04:25:43 -0500

Mohit gravatar image

Try this with python3 , pip3 . It works as the queue module name has been slightly changed/renamed in python3 to Q is in upper/lower case

edit flag offensive delete link more

answered 2020-06-23 22:40:22 -0500

remove existing openstack commandline version and then install the newest version of openstack command-line tool

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2020-06-23 06:40:36 -0500

Seen: 6,798 times

Last updated: Aug 03 '20