Error while import novaclient library to python

583 views Asked by At

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 ?

1

There are 1 answers

0
user1411260 On

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