I have this tree format.

> myapp->
>      setup.py
>      tests ->
>           test_myapp.py
>      myapp -> 
>           __init__.py
>          myapp.py

And from test_myapp.py, I am calling: from myapp import myapp and when I runpython setup.py test I am getting No module named 'myapp'

Recommended Answers

All 2 Replies

I'd recommend using python setup.py develop first, which will install a symbolic link allowing python to import and use myapp without really installing the package. If you're using a virtualenv, make sure the command uses your virtualenv's python interpreter.

Hmm.. It worked fine now!! Thanks!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.