解决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"
如图
![](https://images0.cnblogs.com/blog2015/679105/201505/221728490105172.png)
![](https://images0.cnblogs.com/blog2015/679105/201505/221729083073000.png)
最终效果:
![](https://images0.cnblogs.com/blog2015/679105/201505/221730013693612.png)
参考:
http://my.oschina.net/hcp/blog/41989
http://bbs.csdn.net/topics/390695339