Reputation: 1450
I have a python project structure shown below,
├── example
├── test.py
└── module
├── __init__.py
├── mymod.py
└── submod.py
I imported above project into a pyDev project and test.py
could not import mymod
.
I was importing module inf following way.
from module import mymod
I added module
directory to pyDev PYTHONPATH
but that did not hep.
I could run the test.py
from console without any problem.
Upvotes: 0
Views: 496
Reputation: 25332
As @Giacomo d'Antonio said, you have to add 'example' to the PYTHONPATH (and if you had added 'module' to the PYTHONPATH you should also remove it).
Upvotes: 0