Ask Your Question

nosetests: no module named tempest

asked 2015-11-24 05:47:29 -0500

Randomly Named User gravatar image

I've created a virtual environment using ./ in the tempest directory in /opt/stack/tempest/. Then, I activate the virtual environment by running ./venv/bin/activate.

When I run any test, for example,

(.venv)root@ubuntu:/opt/stack/tempest# nosetests -vx

I get this error

Failure: ImportError (No module named tempest_lib) ... ERROR

ERROR: Failure: ImportError (No module named tempest_lib)
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nose/", line 411, in loadTestsFromName
    addr.filename, addr.module)
  File "/usr/lib/python2.7/dist-packages/nose/", line 47, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File "/usr/lib/python2.7/dist-packages/nose/", line 94, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File "/opt/stack/tempest/tempest_test/tempest/tempest/api/identity/admin/v3/", line 16, in <module>
    from tempest.api.identity import base
  File "/opt/stack/tempest/tempest_test/tempest/tempest/api/identity/", line 17, in <module>
    from tempest_lib import exceptions as lib_exc
ImportError: No module named tempest_lib

Ran 1 test in 0.001s

FAILED (errors=1)

Any idea why it's failing?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2016-01-06 22:46:17 -0500

Jagan Prakash gravatar image

fix the python dependencies in the virtual environment then you wont get the above error

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2015-11-24 05:47:29 -0500

Seen: 597 times

Last updated: Jan 06 '16