pydev doesn't find python library after installation
I'm using Django and PyDev/Eclipse. I just installed django-treebeard with setup.py install
and it got installed in my site-packages directory C:\Python26\Lib\site-packages
. I can successfully import it in the python shell with import treebeard
. However PyDev complains that it cannot resolve it when I try to import it. 开发者_Go百科
Unfortunately I have no experience with PyDev and I assumed that it would automatically pick up everything in the site-packages directory but apparently it does not. What am I missing?
thanks
Pydev doesn't automatically rescan the site-packages folder. You need to go to Preferences-> Interpreter -> Python
and click apply to make it scan again.
I also faced the same error when i had installed a new package.i'm using eclipse Helios. Even after applying and re scanning the folder it was NOT detecting the new packages. So finally i clicked on the "Click here to configure a interpreter not listed" listed and deleted the already selected interpreter and used the autoconfig to add the interpreter again. Finally i was able to resolve the issue.
I've found that closing the project and reopening (after rescanning the interpreter) works for me.
Well, I followed this sequence to make it work:
1) I installed the desired library by using pip install 2) I went in Eclipse to: Window --> Preferences --> Pydev --> Interpreters --> Python Interpreter, and clicked "Quick Auto-Config". It made the trick.
精彩评论