2

I've installed pydev to my eclipse 3.5.2. Everything was working smoothly, create projects, execute, test, autocomplete.

But then I realized that importing modules from /usr/lib/pymodules/python2.6, such as django, causes error "Unresolved import: xxxx". Of course, PYTHONPATH SYSTEM includes the directories I want. What's more, inside package explorer i can c the modules under "System Libs".

I just can't import them :S. Is this a bug? Or I just missing something.

Thanks.

1
  • 1
    I had to add libs as folders using project properties dialog. Not a clean solution sure, but I can work for now. Project properties -> PyDev - PYTHONPATH -> External Libraries. Commented Feb 4, 2011 at 1:57

3 Answers 3

2

In eclipse you can add django folder in you python path.

Window->Preferences-> PyDev-> Interpreters->Python Interpreter -> Lirararies -> New Folder

And browse till the parent folder of modules you are searching.

Sign up to request clarification or add additional context in comments.

Comments

1

If you're using virtualenv you should setup an interpreter using the python build inside.

ie., default python interpreter for th project will be /usr/bin/python

but change it to something like "{project name} python" and point it to your virtual env path. In my case it's ~/.virtualenvs/acme/bin/python

Comments

1

It seems like some sort of cache issue in PyDev... in which case you could try to remove the interpreter, add it again and restart Eclipse.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.