如何使Eclipse Pydev插件识别新安装的Python模块? [英] How To Make Eclipse Pydev Plugin Recognize Newly Installed Python Modules?

查看:113
本文介绍了如何使Eclipse Pydev插件识别新安装的Python模块?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我刚安装了SubnetTree( http://www.icir.org/robin/pysubnettree/),如果我打开Python交互式解释器,则可以成功导入它,而不会出现任何错误消息.我在其中一个程序中使用了它,并且可以顺利运行.但是,Eclipse将导入标记为错误,这是一个问题,因为我使用Eclipse进行调试.我已经进行了首选项设置并恢复了我正在使用的Python解释器,但无济于事.我只能够还原Python解释器出口,然后在另一台机器(OS X 10.5,我现在使用OS X 10.6)上重新打开它,它确定SubnetTree很好.关于我应该怎么做的任何想法?预先感谢.

So I just installed SubnetTree (http://www.icir.org/robin/pysubnettree/) and if I open the Python interactive interpreter I can successfully import it without any error messages. I use it in one of my programs and can successfully run it without a hitch. However, Eclipse marks the import as an error, and this is a problem as I use Eclipse for debugging. I have gone to preferences and have restored the Python interpreter I am using to no avail. I was able to merely restore the Python interpreter exit, and reopen it on my other machine(OS X 10.5, I am now using OS X 10.6) and it identified SubnetTree just fine. Any idea of how I should go about this? Thanks in advance.

推荐答案

如果您已经尝试刷新"解释器的PYTHONPATH(在Eclipse的Pydev Python解释器配置中),并且它不起作用,则可以尝试从中删除解释器列表并再次创建它.这样做时,您应该正确加载所有模块,即使缺少新模块也是如此.

if you already tried "refreshing" your interpreter's PYTHONPATH (in Eclipse's Pydev Python interpreter configuration) and it didn't work you could try deleting the interpreter from the list and creating it again. When doing this, you should get all your modules loaded correctly, even the missing new modules.

这篇关于如何使Eclipse Pydev插件识别新安装的Python模块?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆