danielrvt
danielrvt

Reputation: 10926

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?

Upvotes: 30

Views: 27290

Answers (2)

Florent
Florent

Reputation: 1928

In Preferences/ PyDev/ Interpreters/ Python Interpreter, go to the Libraries tab and add a new folder for the site-packages folder where your virtualenv packages are installed.

Upvotes: 0

Fabio Zadrozny
Fabio Zadrozny

Reputation: 25342

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

Upvotes: 24

Related Questions