If you want to understand why you are getting the error, start by
understanding Python modules -
http://docs.python.org/tutorial/modules.html

Hint - you can't just copy a script around and expect it to work. The
script depends on other files to make it all happen.

If in python, you type,

import sys
sys.path

... and you see something like C:\first\Python26\Lib\site-packages, it
should work fine assuming Django was installed using setuptools or
pip. If not, you should look into using that instead of manually
installing it.

If you insist on doing it manually, you need to look into creating a
.pth file to add the packages into the PYTHONPATH.

On 25 August 2010 18:06, gintare <g.statk...@gmail.com> wrote:
> I am not able to run django under windows7
>
> python django-admin.py  #is recognized if i paste it to c:/first/
> Python26 together with python executable.
>
> I am getting error:  No module named django.core
> File "django-admin.py", line2, in <module>
> from django.core import management
>
> It seems the command line do not know about variables in the path:
> Python django-admin.py    #is not recognized if i use path variable
>  "C:/first/Python26/Lib/site-packages/django-1.2.1/django/bin"
> It is recongmized as a command in if paste it to C:/first/Python26.
>
> I added paths to System Path Variable:
> C:/first/Python26
> which contains copy af django-admin.py
> C:/first/Python26/Scripts                                      which
> contains copy af django-admin.py
> C:/first/Python26/Lib/site-packages/django-1.2.1/django/bin      -
> original django-admin.py
>
> I run from command line cmd beeingin c:/first/Python26
> python  # command works
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to