pydev "Undefined variable from import"

    eclipse安装pydev后, 编写wxPython程序, 编辑器经常报错, 而且也没有自动提示功能,但是程序运行没任何问题. 

 

    pydev "Undefined variable from import"

 

    查看window->prefences->pyDev->Interpreter- Python 发现其lib路径没有指到wxPython安装目录; 因为wxPython是后来安装的, 想来eclipse没有更新lib目录所致. 

 

   pydev "Undefined variable from import"

 

   解决方法: 删除默认的python配置后,重新设置python路径. 通过截图发现libraries添加了新的路径: D:\Python27\Lib\site-packages\wx-2.8-msw-unicode

 

  pydev "Undefined variable from import"