Ask Your Question
0

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/__init__.py:30: 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: openstackclient.shell compute API version 2, cmd group openstack.compute.v2
DEBUG: openstackclient.shell network API version 2, cmd group openstack.network.v2
DEBUG: openstackclient.shell image API version 1, cmd group openstack.image.v1
DEBUG: openstackclient.shell volume API version 1, cmd group openstack.volume.v1
DEBUG: openstackclient.shell identity API version 3, cmd group openstack.identity.v3
DEBUG: openstackclient.shell object_store API version 1, cmd group openstack.object_store.v1
ERROR: openstackclient.shell Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/openstackclient/shell.py", line 177, in run
    return super(OpenStackShell, self).run(argv)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 215, in run
    result = self.run_subcommand(remainder)
  File "/usr/lib/python2.7/site-packages/cliff/app.py", line 261, in run_subcommand
    subcommand = self.command_manager.find_command(argv)
  File "/usr/lib/python2.7/site-packages/cliff/commandmanager.py", line 72, in find_command
    cmd_factory = cmd_ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2259, in load
    if require: self.require(env, installer)
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2272, in require
    working_set.resolve(self.dist.requires(self.extras),env,installer)))
  File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve
    raise DistributionNotFound(req)
DistributionNotFound: argparse
edit retag flag offensive close merge delete

Comments

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
0

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/argparse.py

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

edit flag offensive delete link more

Comments

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

# ls /usr/lib64/python2.7/argparse.py
/usr/lib64/python2.7/argparse.py
deeghuge gravatar imagedeeghuge ( 2015-04-07 06:24:28 -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

Stats

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

Seen: 1,004 times

Last updated: Apr 07 '15