This forum is no longer active. Please post your questions to our new community site

ImportError: No module named django.core

Subscribe to ImportError: No module named django.core 6 post(s), 3 voice(s)

 
Avatar François Par... 5 post(s)

I’m under Vista, and modified setenv.bat to make django-admin.py available from the django environment (Use BitNami DjangoStack in the Start menu).

Now that django-admin.py is in the path, it does not work:

C:\Users\François\BitNami DjangoStack projects>django-admin.py startproject mysite
Traceback (most recent call last):
File “C:\Program Files\BitNami DjangoStack\apps\django\django\bin\django-admin.py”, line 2, in
from django.core import management
ImportError: No module named django.core

There seems to be a trouble with Python’s path…

 
Avatar carlos Administrator 144 post(s)

Hi,

Did the change described at https://bitnami.com/forums/forums/djangostack/to… fix your issue?

 
Avatar François Par... 5 post(s)

Hi.

Unfortunately, it did not fix the issue.

 
Avatar carlos Administrator 144 post(s)

Does it work for you if you specify the path to django-admin.py script?

python “C:\Program Files\BitNami DjangoStack\apps\django\django\bin\django-admin.py” startproject mysite

Do you have any other python installed in your system?

 
Avatar François Par... 5 post(s)

Specifying the path to django-admin.py script makes it work.
:)
But it’s a bit tedious to type.

Yes, I have another Python (2.5.2) installed. And without using the “Use Bitnami Djangostack” CLI (in a normal Windows Shell), it does not work either.

 
Avatar Beltrán Rueda Administrator 3,714 post(s)

Hi,

We will fix that for the next version.

Regarding to run any django command from a command prompt different to “Use Django”, the Stack is independent from the system and do not modify the environment variables. If you prefer you can add the Stack environment variables to your system variables. You can find them in installdir/scripts/setenv.bat file.