解决Eclipse Pydev中import时报错:Unresolved import

在安装 图像处理工具包 mahotas 后,在eclipse中尝试import mahotas时,出现Unresolved import错误,按快捷无法自动生成代码提示

但是,程序运行时可以通过,在命令行中import时,正常

解决方法如下:

在project右击打开菜单 ->选择properties->选择"PyDev-Interpreter/Grammar"->点击链接"Click here to configure an interpreter not listed." -> 在"Libraries"tab内,点击"new folder",加入module的路径->点击"ok"

如图
最终效果:
 
参考:
http://my.oschina.net/hcp/blog/41989
http://bbs.csdn.net/topics/390695339
原文地址:https://www.cnblogs.com/hanahimi/p/4522907.html