Ask Your Question

yardstick installation error

asked 2016-01-11 19:49:34 -0800

gajenderpathak gravatar image

After executing the command - python develop

I am getting following error -

File "/home/egajepa/yardstick_venv/local/lib/python2.7/site-pacakages/testrepository-" , line 40.

import subunit

ImportError : No module named subunit

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2016-02-08 19:13:03 -0800

gajenderpathak gravatar image

Thanks for taking time out,


I have successfully installed Yardstick.

Some issues and their respective solutions are here - I

1. Some python packages were missing like subunit.

          Installed the Packages

2. PYTHONPATH was not set correctly

         Added "export PYTHONPATH=/usr/lib/python2.7/dist-packages/"

3. Some packages were getting installed in /usr/local/lib/python2.7/dist-packages

        I copied all those packages to /usr/lib/python2.7/dist-packages/. As I don't know how to add  the path in python environmental variables.

4. /usr/lib/python2.5/distutils/ was not updated

       Used this link
edit flag offensive delete link more

answered 2016-02-03 15:09:08 -0800

lmcdasm gravatar image

hey there.

this is a wild guess - but is it possible that on our build machine you dont have the python (or maybe its a pip) module "subunit" installed and thus, when it tried to resolve that module and import at python runtime, it cant?

try doing a sudo pip install subunit or maybe apt-get install python-subunit..

Sorry (its bee a while since i did python library adds - you can google how to add / install missing python/pip module - this seems pretty good place to start).

cheers, Daniel

edit flag offensive delete link more


I have tried sudo apt-get install python-subunit. And this show already updated version is there. All these packages are present in the /usr/lib/python2.7/dist-packages . I think it is some environment variable error. help plz

gajenderpathak ( 2016-02-07 21:10:29 -0800 )edit

can you post the script you are trying to run and the commands in full so we can see? Are you running the as sudo?

lmcdasm ( 2016-02-08 09:52:32 -0800 )edit

Can you check in your script that the import statement exists (so that subunit is being called into the script) - would need to see it, but sounds alot like

lmcdasm ( 2016-02-08 09:54:57 -0800 )edit

Thanks , I have posted the solution. Please let me know the correct solution if I have missed out something.

gajenderpathak ( 2016-02-08 19:15:14 -0800 )edit

you can also try this :) export PYTHONPATH="$PYTHONPATH:/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python" at the end of the .bash_profile file.

lmcdasm ( 2016-02-09 19:47:08 -0800 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

[hide preview]

Question Tools

1 follower


Asked: 2016-01-11 19:49:34 -0800

Seen: 1,046 times

Last updated: Feb 08 '16