I’m running PyDev in Eclipse 4.2 on Mountain Lion. I installed the SciPy Superpack, and can use all the packages — including Scikit-learn and MatPlotLib — in the Python interpreter and through IPython. However, when I try to import them in PyDev I get an ‘Unresolved import’ error.
I installed Python 2.7.3 from Python.org, and verified that PyDev is pointing to the correct interpreter. I also attempted to add the sklearn and matplotlib directories (verified via the path from sklearn.__file__) to the System PYTHONPATH in the PyDev settings. This didn’t resolve the issue.
Any idea what else I should try?
From your comment examples, seems the path you are using is at the wrong depth.
Change from:
/Library/Python/2.7/site-packages/scikit_learn-0.12_git-py2.7-macosx-10.8-intel.egg/sklearnTo:
/Library/Python/2.7/site-packages/scikit_learn-0.12_git-py2.7-macosx-10.8-intel.eggIt wasn’t able to find the package level name because you were specifying beneath it. Normally a python interpreter will resolve all the eggs by simply existing insite the site-packages, from the `.pth’ file references that get placed there. But I think pyDev will need explicit adding of those eggs to the PYTHONPATH.