0

I am trying to run manage.py and i keep getting this error:

Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
ImportError: No module named django.core.management

I have tried setting my path to "/python27/lib/python2.7/site-packages/" and also added the path "/python27/lib/python2.7/site-packages/django" just in case, but neither to seem to be working.

I have checked the module, and it exits, so this has to be a PATH issue. Can anyone help?

I am running Python 2.7.4 and Django 1.5.2

Thank you

Aaron Lelevier
  • 19,850
  • 11
  • 76
  • 111
  • What does `sys.path` returns? – Ashwini Chaudhary Aug 21 '13 at 15:02
  • 1
    [Some ideas in this post](http://stackoverflow.com/questions/6049933/django-import-error-no-module-named-core-management) – karthikr Aug 21 '13 at 15:03
  • Where did you set this path? And are you running in a virtualenv? – trpt4him Aug 21 '13 at 15:52
  • can you import django from the terminal ? you can also check your sys.path from the terminal... – bitfish Aug 21 '13 at 16:22
  • I'm not using virtualenv currently, but plan to add it. So, my python must have been python3 on bluehost.com, my hosting site, because when i typed "python2 manage.py" it worked. Then i did "alias python=python2.7" and then ran as normal "python manage.py" and that worked too, so I guess that was the issue. Thank you everyone, and @karthikr that other thread had good info and those are the solutions that i tried n worked. thanks – Aaron Lelevier Aug 22 '13 at 00:49

0 Answers0