I am using the same Python (2.7) Git branch on two different computers. On one of the computers I am running Eclipse and everything builds smoothly without any errors. In Eclipse I have also configured an external library.
When I try to run the same code from command line using Python I have to change the following import statement
from src.configuration import Color
to
from configuration import Color
for the import to work on the second computer. This applies to all local import statements. Now, when I push the changes onto Git and pull on the other computer, I receive Unresolved Import
errors in Eclipse.
I have been able to isolate the error to Eclipse, as I am able to run the main module without the src.*
in Python also from command line. (The grammar in Eclipse is also set to 2.7)
How can I resolve this?
EDIT: This is possibly related to How to fix "Attempted relative import in non-package" even with __init__.py