I have a pydev project open in eclipse.
The nested package packages are as follows:
my-package: my-sub-package: foo
In this project, I am using import from another project that I created. Another project nesting:
my-package: my-sub-package: bar
Thus, the 2 main packages have the same name.
When trying to import: from my-package.my-sub-package import bar I get ImportError: No module named bar .
I assume that this is because eclipse is searching in the current project and when it does not find the bar , it does not look for it in dist-utils (where I pip installed the project I'm trying to import from).
(When trying to do the same import from regular python opened from the same place, the import works fine, so this is something in eclipse).
Is there a way to tell eclipse to continue searching for a module in all folders in pythonpath (so that it can reach dist-utils) even if the packages have the same name and it did not find the right package in the current project?
Thank you very much.
source share