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.
3 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.

- 1,216
- 12
- 19
-
2Awesome! That did it. For anyone else who is wondering... I had to remove the interpreter listed there, then hit "Auto Config" and it opened a box with all of the system python libraries selected, I had to select /Library/Python/2.6/site-packages as well(was unselected by default) and after that it recognized the module. Thanks for the help! – Stunner Sep 17 '10 at 02:31
-
1See the new answer from @chrislott below which should now become the accepted answer. This one was correct at the time, but pydev has finally addressed the problem. – kdopen Apr 15 '15 at 00:07
PyDev version 3.6, on the Eclipse Preferences -> PyDev -> Interpreters preferences pane, offers a button labeled "Check if interpreters are synchronized with environment". On my mac and Eclipse Luna, clicking on this button triggered some behind-the-scenes magic that solved my problem of PyDev not noticing a new installation of PeeWee. I saw a message flash briefly in the lower-right corner of the main Eclipse window "Synch System PYTHONPATH." I did not remove nor re-add the interpreter (Python 2.7), restarting Eclipse did not solve the problem either; but clicking this button did.

- 3,571
- 3
- 34
- 43
-
This should now be the accepted answer. Also worked for me on Linux with Eclipse Kepler (currently PyDev 3.8). – kdopen Apr 15 '15 at 00:06
Yes - it works! I've been stuck on this for three days. Go to Project, Properties, PyDev - Interpreter/Grammar, "Click here to configure an interpreter not listed", highlight & Remove python (C:/Python27\Python.exe), Auto Configure (brings up a list below that you can review and checkmark as needed), then click on OK.

- 21
- 1