Hey friends i set my python path as
/home/rohit/test
Here is the structure my test folder
test/
__init__.py
meetinghandler/
__init__.py
meetinghandler.py
db/
__init__.py
models.py
setting.py
manage.py
My problem is when i am trying to import
from test.meetinghandler import meetinghandler
from models.py
i am getting error i.e;
ImportError: No module named test.meetinghandler
please help me out what i am doing wrong .
from test import meetinghandlerlooks for atestmodule, which it will not find in your python path.The reason? You added
/home/rohit/test/to your python path, but that directory doesn’t itself contain atestdirectory 🙂 Python looks for modules inside the path, that’s why.In your case you’d have to add your home dir to your python path to be able to find it. (Or better, google for virtualenv and so).