Search code examples
pythondjangodjango-adminpkg-resources

Cannot start new Django project


I already have a website running under Django. It is a full project with many applications. Now I want to start a new project, so I type

django-admin startproject exampleProject

But I receive an error message:

Traceback (most recent call last):
File "/usr/local/bin/django-admin", line 5, in <module>
  from pkg_resources import load_entry_point
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 3018, in <module>
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 614, in _build_master
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 627, in _build_from_requirements
File "build/bdist.linux-x86_64/egg/pkg_resources/__init__.py", line 805, in resolve
pkg_resources.DistributionNotFound: Django==1.7.3

My last project wasn't created, but was received through GIT. Python version is 2.7 and Django version is 1.6, and I cannot upgrade them (because of reasons :-( ). Any ideas what to do?


Solution

  • Ok, I think I have something. Apparently, I must have installed two Djangos. I don't know how I did it, but I did. After uninstalling one, I still received the same mistake, so instead of

    django-admin startproject exampleProject
    

    I typed in

    django-admin.py startproject exampleProject
    

    and it worked. At least, it seems so...