I have reviewed most of the similar question here. I'm new to python and I'm using Ubuntu 13.10 The project structure is
├── projecttest
│ ├── api.py
│ ├── controller
│ │ ├── controller.py
│ │ ├── controller.pyc
│ │ ├── init_db.py
│ │ ├── __init__.py
│ │ ├── __init__.pyc
│ │ ├── settings.py
│ │ ├── settings.pyc
│ │ └── extra
│ │ ├── extra.py
│ │ ├── extra.pyc
│ │ ├── __init__.py
│ │ └── __init__.pyc
│ ├── __init__.py
│ ├── lib
│ │ └── __init__.py
│ ├── models
│ │ ├── documents.py
│ │ ├── documents.pyc
│ │ └── __init__.py
All the __init__.py
files are empty (no hidden characters) and when I'm trying
$ python init_db.py
that has:
from projecttest.models.documents import *
I'm getting:
Traceback (most recent call last):
File "controllers/init_db.py", line 1, in <module>
from projecttest.models.documents import *
ImportError: No module named projecttest.models.documents