Eclipse + PyDev: Eclipse telling me that this is a

2019-07-18 10:49发布

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?

2条回答
Lonely孤独者°
2楼-- · 2019-07-18 11:06

Daniel is right. As long as twython went into site-packages then Pydev will find it.

查看更多
Anthone
3楼-- · 2019-07-18 11:14

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.

查看更多
登录 后发表回答