Accepted answer

you may compare python path under eclipse and terminal by

import sys
print ( sys.path )

the order of entries does matter. my guess is that the fact that your python file is in a folder called sklearn ( i.e .../project/src/sklearn) is messing the import statement.

requested edit: as it turned out, the problem was that the python script was in a folder called sklearn and python would look into that folder to import svm.

Related Query

More Query from same tag