Please help me find the cause of this problem with my Django installation on Windows.
C:\Djangoprojects>django-admin.py startproject mydjangoblog
Traceback (most recent call last):
File "C:\Python27\Scripts\django-admin.py", line 4, in <module>
import pkg_resources
File "build\bdist.win-amd64\egg\pkg_resources.py", line 3007, in <module>
File "build\bdist.win-amd64\egg\pkg_resources.py", line 728, in require
File "build\bdist.win-amd64\egg\pkg_resources.py", line 626, in resolve
pkg_resources.DistributionNotFound: django==1.5.1
I just installed Django 1.5.1 and I remember I had the 1.4.3 before removing it. When I try to create a project, the above error is shown.
After a few adjustments - which included adding the whole directory of Python27\Lib\site-packages\django\bin to the path variable, this is the error I now get when I try to create a project:
C:\Djangoprojects>django-admin.py startproject djangoblog
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\django\bin\django-admin.py", line 2, in <module>
from django.core import management
ImportError: No module named django.core
The question am now asking myself is this: Where should I put the django folder? In its own place or within python27?
I can import Django through the Python Interactive shell without a problem. I have also added django-admin.py to the system path variable just in case.
Thanks in advance.