Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How To Make Eclipse Pydev Plugin Recognize Newly Installed Python Modules?

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.

like image 973
Stunner Avatar asked Sep 17 '10 01:09

Stunner


People also ask

How do I import a Python module in Eclipse?

Select PyDev —> Interpreters —> Python Interpreter menu item in Preferences window left panel. Click the Libraries tab in the right panel. Click the New Folder button to browse and select the python module library folder. After that, you can see the module library folder has been added under the System Libs node.

How do I enable Python in Eclipse?

Go to Window → Preferences. In the Preferences window, expand PyDev and select Interpreter-Python. Click "New..." and type Python32 for the Interpreter name. For the Interpreter executable, browse to your copy of Python (C:\Program Files\Python32\python.exe), and press Open.

How do I open PyDev project in Eclipse?

After opening Eclipse, go to the menu: File > New > Project > PyDev > PyDev project.


1 Answers

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.

like image 135
Federico Cáceres Avatar answered Oct 03 '22 21:10

Federico Cáceres