Setting up Django with Eclipse - “Django not found”

后端 未结 2 1518
独厮守ぢ
独厮守ぢ 2020-12-21 02:48

I\'m trying to setup Django with Eclipse. Right now I\'m creating a new Pydev Django project, and getting \"Django not found\" error message.

When I try to verify Dj

相关标签:
2条回答
  • 2020-12-21 03:24

    If you added the python interpreter before installing django, you can get this error message. Remove the python interpreter from eclipse and add it again. Eclipse will do some caching/searching of some sort. This solved my same problem.

    0 讨论(0)
  • 2020-12-21 03:24

    In my case I use virtualenv and a custom local version of easy_install to avoid needing to be root. I have Django installed in ~/.local/lib/python2.7/site-packages/. I added this path in Eclipse in the PyDev interpreter.

    However, this did not fix the problem. It turned out that I needed to explicitly add the Django directory as well (ie: ~/.local/lib/python2.7/site-packages/Django-1.6.2-py2.7.egg/).

    So remember to explicitly select the Django directory in PyDev interpreter especially if you have stuff customized in some fashion.

    0 讨论(0)
提交回复
热议问题