0

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'

Edited by glao

2
Contributors
2
Replies
31
Views
6 Months
Discussion Span
Last Post by glao
2

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.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.