views:

94

answers:

5

I have python installed with django. I know the installation is there because I installed it following the directions and in the command line I can do "import python" and there is no crash.

When I try creating a django project in pydev, I get an error: "Django not found."

What could the problem be?

A: 

Run the "import django" in the python shell to test if django is correctly installed.

Seitaridis
I did, as mentioned in the original post.
tipu
And the "import django" statement raises no exception?
Seitaridis
Correct, no crash no nothing when I import it.
tipu
Then it has to do with the Python plugin for Eclipse you use. I use this http://pydev.org/updates for my Pydev plugin.
Seitaridis
+4  A: 

go in the menu to window -> preference -> pydev -> Interpreter - Python ; and add the python interpreter there, if you installed the django in a virtual environment you should add the python interpreter of the virtual env ; after adding the interpreter by clicking on new you should now click on Apply , you should see now all the system libs from PYTHONPATH added there between them Django .

hope this will help

singularity
I have set the interpreter up in windows -> preferences -> pydev -> interpreter. however everything you are talking about after that I'm confused about, being unsure of what a virtual environment is and if I stalled django in one.
tipu
@tipu ok forget about the virtual env stuff , after setting up the python interpreter you can click on Apply now you will see a bunch of library being loaded and you should see between them Django. now you can go to file -> new -> project -> pydev -> django and just keep hitting the next button that it, :)
singularity
A: 

I stumbled upon this only yesterday myself: Django must not be among the system libraries for this to function...

cpt_ahag
A: 

I think I've got the same problem, Eclipse 3.5.2 on Fedora. In my PyDev Python interpreter settings I've got the site-packages/django folder (site-packages/django/bin too, just in case), but when I try to create a django project I get an error dialogue saying "It seems that the selected interpreter does not have Django available". Looks like I'm going to have to use Eric4, which is a pity because I can't get that working at all on my Windows rig! Unless I manage to understand the cryptic advice above, "Django must not be among the system libraries for this to function..."

Jaffa McNeill