Library import succeeds with nose, fails elsewhere

richmolj at richmolj at
Sat Apr 25 19:48:23 CEST 2015

Apologies, I'm a rubyist and this is a beginner question but I'm not finding a great answer with lots of googling. I am writing a library, organized something like this:


In the top of

foo = 'bar'
import helper

In the top of

import awesome

IRL, I'm doing this for things like referring to the main logger from within the utility method.

This works great when running tests through nose. In a test file I 'import awesome', refer to awesome.helper and everything is fine.

If I try to put this library into a project, however, the import fails:


'python' (only code is 'from awesome_lib import awesome')
 ImportError: No module named awesome

The error occurs when importing the helper and it tries to 'import awesome' and fails.

I'm sure I am doing something stupid, can someone point me in the right direction?

More information about the Python-list mailing list