Unresolved import: models


Question

I'm doing my VERY first project using python/django/eclipse/pydev following this guide

http://docs.djangoproject.com/en/dev/intro/tutorial01/

My only addition is the use of Eclipse/pydev.

I'm getting many errors related to "Unresolved imports". I can remove the errors using "remove error markers" and my site runs perfect (I can browse it) but I want to get rid definitively of this problem since errors pop up again after I removed them.

Any ideas?

EDIT

Using Ubuntu 9.1

1
16
10/18/2017 10:24:27 PM

Accepted Answer

I was able to get rid of the import errors executing this cmd

sudo ln -s /usr/lib/pymodules/ /usr/lib/python2.6/pymodules

I was lucky, testing different things I could resolve it but I'm not sure why I have to do this and how I could avoid doing it.

5
6/6/2011 3:06:52 PM

Check your pythonpath. You need to include the parent directory of django, usually Lib/site-packages.


Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon