Nick Read
Nick Read

Reputation: 7

python2.7 manage.py runserver

I'm using python 2.7 and am having trouble running the server. I have entered

python2.7 manage.py runserver and got the following error message

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 went into the manage.py portion of the app and can see that I have

if __name__ == "__main__":
    os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myesite.settings")

    from django.core.management import execute_from_command_line

    execute_from_command_line(sys.argv)

can someone please explain what I have done wrong or what I need to do?

Upvotes: 0

Views: 911

Answers (1)

Jason Lee
Jason Lee

Reputation: 323

Do you have the django package installed? go to your command line and type "pip list" and see if django is in the list.

If it is not, "pip install django" should allow you to download and install the package.

Upvotes: 1

Related Questions