Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up Eclipse Juno with PyDev and Virtualenv

I have managed to set up the python interpreter of my pydev installation to the one in my virtualenv folder following this steps:

  1. MyProject -> Properties -> PyDev - Interpreter/Grammar
  2. Click on "Click here to configure an interpreter not listed"
  3. In the section "Python Interpreters" -> new -> Browse -> Select my virtualenv interpreter
  4. Select the new interpreter as the default one clicking in the up button with the interpreter selected.

Yei! everything works nice! but... When I use any library installed via pip, my eclipse shows an error mark in the editor, its very annoying because everything works fine!

enter image description here

I'm thinking of not using PyDev just because of this little detail... Does anyone know a way to solve this?

like image 339
danielrvt Avatar asked Nov 29 '12 02:11

danielrvt


People also ask

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 run PyDev?

Go to the menu: Alt + R + S + The number of the Run you wish (It can be Python, Jython, unit-test, etc). Note: if you were using unit-tests, you could use: Ctrl+F9 to run the unit-tests from the module (and even selecting which tests should be run -- and if Shift is pressed it's launched in debug mode).


1 Answers

There's a little tutorial explaining about it at:

http://pydev.blogspot.com.br/2010/04/pydev-and-virtualenv.html

I believe your problem is explained there... (i.e.: after installing something you must restore your interpreter info).

like image 72
Fabio Zadrozny Avatar answered Sep 20 '22 03:09

Fabio Zadrozny