Setting up Eclipse Juno with PyDev and Virtualenv

danielrvt picture danielrvt · Nov 29, 2012 · Viewed 25k times · Source

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?

Answer

Fabio Zadrozny picture Fabio Zadrozny · Nov 30, 2012

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