Ask Your Question

Openstack client command failing with error 'DistributionNotFound: argparse'

asked 2015-04-07 03:08:44 -0500

deeghuge gravatar image

I am getting following error while creating service using openstack client. Same is happening for other commands also. What can be the issue ? Am I missing any package dependency ?

  /usr/bin/openstack --debug --os-token sadfsadfsdaf --os-url http://node1:35357/v3 --os-identity-api-version 3 --insecure service create --name keystone identity
/usr/lib/python2.7/site-packages/novaclient/v1_1/ UserWarning: Module novaclient.v1_1 is deprecated (taken as a basis for novaclient.v2). The preferable way to get client class or object you can find in novaclient.client module.
  warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
DEBUG: compute API version 2, cmd group openstack.compute.v2
DEBUG: network API version 2, cmd group
DEBUG: image API version 1, cmd group openstack.image.v1
DEBUG: volume API version 1, cmd group openstack.volume.v1
DEBUG: identity API version 3, cmd group openstack.identity.v3
DEBUG: object_store API version 1, cmd group openstack.object_store.v1
ERROR: Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/openstackclient/", line 177, in run
    return super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/", line 215, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/cliff/", line 261, in run_subcommand
    subcommand = self.command_manager.find_command(argv)
  File "/usr/lib/python2.7/site-packages/cliff/", line 72, in find_command
    cmd_factory = cmd_ep.load()
  File "/usr/lib/python2.7/site-packages/", line 2259, in load
    if require: self.require(env, installer)
  File "/usr/lib/python2.7/site-packages/", line 2272, in require
  File "/usr/lib/python2.7/site-packages/", line 626, in resolve
    raise DistributionNotFound(req)
DistributionNotFound: argparse
edit retag flag offensive close merge delete


can you elaborate more.

SGPJ gravatar imageSGPJ ( 2015-04-07 06:01:32 -0500 )edit

If something got missed then you can install the missing packages manually and link: argparse

SGPJ gravatar imageSGPJ ( 2015-04-07 06:03:34 -0500 )edit

@deeghuge did you find any solution. I am also facing similar issue.

ankits gravatar imageankits ( 2016-10-18 15:24:31 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-04-07 04:42:59 -0500

sbiswas7 gravatar image

Which version of openstack are you using? You seem to be using a deprecated version of the Nova client.

argparse should come as a part of your distro starting from python 2.7 or greater. You can verify this by going to /usr/lib64/python2.7/

If that file is not present, you can do a pip install argparse That should resolve your issue.

edit flag offensive delete link more


argparse is already present at required location, still it is failing

# ls /usr/lib64/python2.7/
deeghuge gravatar imagedeeghuge ( 2015-04-07 06:24:28 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-04-07 03:08:44 -0500

Seen: 1,113 times

Last updated: Apr 07 '15