ImportError using Django

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • guile
    New Member
    • Apr 2007
    • 18

    #1

    ImportError using Django

    hi,
    i'm running apache 2.2.3 on windows xp and have python 2.5 and mysql 5 installed. i'm having problems installing django. please give me some help.

    i created a folder "django" in my c:\python25\lib \site-packages\
    then i used svn to stuff it with the latest build (in trunk)
    i copied my bin\django-admin.py into the scripts folder of python
    i added c:\python25\, c:\python25\scr ipts\ to my path variable

    now, i can create and folder, go inside it through the command prompt and use startproject to create a new project folder with the initial files. but when i call
    Code:
     python manage.py runserver
    i get the error message
    Code:
    Traceback (most recent call last):
      File "manage.py", line 2, in ?
        from django.core.management import execute_manager
    ImportError: No module named django.core.management
    i can't figure out the error. can anybody help? google doesnt give helpful results.

    PS: I see something odd. When I am in the python folder, and call "import django" through the interactive interpreter, it works fine. but not in case i run the python interpreter from any other folder. something else might be wrong. perhaps paths or something. am i on the right lead?
    Last edited by guile; Jun 10 '07, 10:02 AM. Reason: additional supporting information
  • bartonc
    Recognized Expert Expert
    • Sep 2006
    • 6478

    #2
    Creating a text file with a ".PTH" extension instead of ".TXT" with the path
    "django\core\ma nagement" as the contents and storing it in the site-packages folder should do the trick.

    Comment

    • bartonc
      Recognized Expert Expert
      • Sep 2006
      • 6478

      #3
      Originally posted by guile
      i'm running apache 2.2.3 on windows xp and have python 2.5 and mysql 5 installed
      By the way, thanks very much for posting such a detailed description for your system and error. That makes things much easier on this end.

      Comment

      Working...