Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Refresh PyDev import paths in Eclipse

I'm using Eclipse Helios under Ubuntu.

Whenever I install a new library under /usr/local/lib/python2.6/dist-packages/ using pip, Eclipse doesn't see it and complains about invalid imports. I double checked the library is in place. Importing it works from the interpreter. Refreshing the PyDev configuration or restarting the IDE doesn't work. Note: the mentioned path is on the list of library paths in the Python interpreter tab.

Does anybody know of a remedy to this, and if not how to track down the actual cause.

like image 293
julx Avatar asked Apr 18 '11 15:04

julx


1 Answers

The problem was that I installed the library from an egg. Egg folders need to be added manually or otherwise PyDev won't see them. Another thing that confused me a little was that I had another version of the same library installed as a regular folder. That folder however didn't have __init__.py in it.

like image 124
julx Avatar answered Oct 22 '22 21:10

julx