Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

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

like image 331
Raoul Duke Avatar asked Aug 31 '10 14:08

Raoul Duke


People also ask

How do I run Python in PyDev?

Configure PyDevGo 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 know if PyDev is installed?

You can verify if it is correctly installed going to the menu 'window > preferences' and checking if there is a PyDev item under that.

Why is PyDev not showing in Eclipse?

it seems that you installed pydev with wrong version. remember check your java version(by typing java -version in console). if it says 1.6. X, then you should NOT check "Show only the latest versions of available softerware" option in the first popup window after "Help->Install New Software" clicked.

How do I fix PIP module not found?

The Python "ModuleNotFoundError: No module named 'pip'" occurs when pip is not installed in our Python environment. To solve the error, install the module by running the python -m ensurepip --upgrade command on Linux or MacOS or py -m ensurepip --upgrade on Windows.


1 Answers

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.

like image 177
Jochen Ritzel Avatar answered Sep 21 '22 04:09

Jochen Ritzel