importerror: no module named django.core.management

Subscribe to importerror: no module named django.core.management 6 post(s), 4 voice(s)

 
Avatar thunderkel 6 post(s)

installed django stack 1.0.2 on RHEL selected the create initial project option.
Able to launch django and get initial page

Now trying to go through the django tutorial (from django site)
when inside my project directory I issue python manage.py syncdb and receive error

File "manage.py", Line 2, in ?
    from django.core.management import execute_manager

searching some general django forums seems to indicate a bad setup of python home or wrong version.
I am a python novice – anyone else seen this ?

 
Avatar antonio Administrator 487 post(s)

Hi,

Are you in the djangoconsole? There’s a shell script in the installation directory that loads the needed environment variables. Try executing it typing

./djangoconsole

Cheers

 
Avatar thunderkel 6 post(s)

Thanks Antonio that did the trick.

 
Avatar jw00zy33 2 post(s)

Can someone explain this even more… i’m very new. Does it relate to bash$python manage.py shell ???

 
Avatar diego Moderator 16 post(s)

HI jw00zy33, could you give us more details?:
- Which OS are you executing?
- Which command are you typing when you get that error?
- Are you executing it from djangoconsole or from system prompt?

Cheers

 
Avatar jw00zy33 2 post(s)

I’m windows server2003 64bit development box. I’ve gotten this to work on linux, but windows is the suck.

Here’s my DOS prompt:
C:\PROGRA2\BitNami DjangoStack\projects\Hammertool>python manage.py startapp
lls
Traceback (most recent call last): File “manage.py”, line 2, in <module> from django.core.management import execute_manager
ImportError: No module named django.core.management

C:\PROGRA2\BitNami DjangoStack\projects\Hammertool>

I’m not even sure what the djangoconsole is unless it’s >>>

Thanks for the help.