Eclipse + PyDev:Eclipse告诉我这是无效的导入? [英] Eclipse + PyDev: Eclipse telling me that this is an invalid import?

查看:162
本文介绍了Eclipse + PyDev:Eclipse告诉我这是无效的导入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近安装了twython,一个非常好用的Python的twitter API包装器。我安装它,它的解释器工作正常,但是当我尝试通过Eclipse导入它时,它说twython是无效的导入。



我如何告诉eclipse在哪里twython是这样,它会让我导入和使用它?

解决方案

我相信我以前有这个问题 - 尝试进入菜单:Window_Preferences,然后选择Pydev和Interpreter-Python。然后尝试单击自动配置 - 它应该更新其搜索路径,以包括安装在Python中的所有内容。如果这样不起作用,您应该至少能够通过单击该屏幕底部的新建文件夹手动添加文件夹,并导航到安装了twython的位置。


I recently installed twython, a really sleek and awesome twitter API wrapper for Python. I installed it and it works fine from the interpreter, but when I try to import it via Eclipse, it says that twython is an invalid import.

How do I "tell" eclipse where twython is so that it will let me import and use it?

解决方案

I believe I have had this problem before - try going into the menu: Window_Preferences and then select Pydev and Interpreter-Python. Then try to click Auto-config - it should update its search paths to include everything installed in Python. If that doesn't work, you should at least be able to manually add the folder by clicking "New Folder" in the bottom part of that screen and navigating to the location where you have twython installed.

这篇关于Eclipse + PyDev:Eclipse告诉我这是无效的导入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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