Search code examples
eclipsepython-3.xpydev

fix importing errors in Eclipse


I have a folder structure:

/mama-mia
    /framework
        /classses
            FrameworkClass1.py - contains FrameworkClass1
    /projects
        /project1
            Project1Class.py - contains Project1Class

inside Project1Class.py

from framework.classses import FrameworkClass1

Eclipse shows error in this line "Unresolved inmport". How to fix this error - in Eclipse only. For runtime it is worknig as paths are added dynamically.


Solution

  • You need to set the /framework parent folder as a source folder (i.e.: that's the folder that's added to the PYTHONPATH).

    See: http://www.pydev.org/manual_101_project_conf2.html for more details.