Why doesn't Pidev find Django?

I have Django installed. I also have django-admin.py in the python-2.7 folder. I can import django use my Python shell (DreamPie). But I can not create a new Django project in Pydev. When trying to create a new Pydev Django project (choosing python2.7 as the interpreter), the following error message appears:

Django not found

I went to the link in the message, and I have all the prerequisites for starting work in Django: Django is installed and import django works correctly (in the shell).

+4
source share
5 answers

In Eclipse:

Window -> Preferences -> Interpreter - Python.

Be sure to select Python2.7 as the interpreter.

Now click "New Folder". Find the path to django (in this case: C: \ Django-1.2.5 \ django).

preferences

OK β†’ Apply β†’ OK.

What is it. You can create a new Django project.

+5
source

What helped me (adjust the file and file names according to your installation):

I created a copy of the Django-1.3-py2.7.egg-info file from C:\Python27\Lib\site-packages\ in the same folder with the * .egg extender.

Then in the Eclipse dialog box

 Window -> Preferences -> PyDev -> Interpreter-Python 

I used buton New Egg / Zip (s) to add this newly created file to the System PYTHONPATH list.

So Eclipse found Django.

+3
source

The answer to Fabio Zadroznys , which should work for you all.

Probably the PYTHONPATH configured in your interpreter is incorrect ...

Ie: If you have a structure with

/ my / path / django
/ My / path / django / INIT .py

you must make sure that

/ my / path

appended to PYTHONPATH ( and / my / path / django NOT !!! )

One more note: immediately after installing Django, you just need to update> in your interpreter so that it recognizes (go to the interpreter settings page, click> "apply" and select interpreters, analyzed - there are already plans to make this automatic in one of future releases, but now you need to do it manually>, because the interpreter is analyzed when it is configured and "installed in stone").

LINK:
pydev does not recognize django installation

+1
source

not working for me. the attached screen shows that django is being imported from the pydev shell and that its path is in pydev SYSTEMPATH.

enter image description here

(since people mentioned virtualenv in other questions, I will mention that this happens in virtual boxing, but I don’t think this is important?)

0
source

It must be in PATH or in / usr / bin

-1
source

Source: https://habr.com/ru/post/1344312/


All Articles