Skip to main content
 首页 » 编程设计

python之eclipse + PyDev : Eclipse telling me that this is an invalid import

2024年09月03日33freeliver54

我最近安装了 twython,这是一个非常时尚且很棒的 Python Twitter API 包装器。我安装了它,它在解释器中工作正常,但是当我尝试通过 Eclipse 导入它时,它说 twython 是无效导入。

我如何“告诉”eclipse twython 在哪里,以便它允许我导入和使用它?

请您参考如下方法:

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