0

I am importing novalient API library to python 2.7.3 as follows

from novaclient.v1_1 import client

when i try this this , it gives me following error

Traceback (most recent call last):


File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/novaclient/__init__.py", line 18, in <module>
__version__ = pbr.version.VersionInfo('python-novaclient').version_string()
File "/usr/local/lib/python2.7/dist-packages/pbr/version.py", line 78, in version_string
for part in self.release_string().split('.'):
File "/usr/local/lib/python2.7/dist-packages/pbr/version.py", line 70, in release_string
self.release = self._get_version_from_pkg_resources()
File "/usr/local/lib/python2.7/dist-packages/pbr/version.py", line 62, in _get_version_from_pkg_resources
return packaging.get_version(self.package)
File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 861, in get_version
version = _get_version_from_git(pre_version)
File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 802, in _get_version_from_git
git_dir = _get_git_directory()
File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 215, in _get_git_directory
return _run_shell_command(['git', 'rev-parse', '--git-dir'])
File "/usr/local/lib/python2.7/dist-packages/pbr/packaging.py", line 204, in _run_shell_command
env=newenv)
File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

how to solve this issue? Is this a version related issue ?

sorin
  • 161,544
  • 178
  • 535
  • 806
Malintha
  • 4,512
  • 9
  • 48
  • 82
  • 1
    Did you install the actual Nova software? It appears novaclient can't find it. If you installed it, *where* did you install it? Is it on `$PATH`? –  Aug 26 '14 at 10:13
  • how to install the nova software here? – Malintha Aug 26 '14 at 10:16
  • Btw, is your traceback complete? It seems it is missing some lines. –  Aug 26 '14 at 10:24
  • And that, those missing lines, solve everything: apparently, the `pbr` package, which is used by `novaclient`, requires `git` to be installed on your system. –  Aug 26 '14 at 11:33

1 Answers1

1

You can read more about pbr (Python Build Reasonableness) here: http://docs.openstack.org/developer/pbr/

user1411260
  • 563
  • 4
  • 5