tomter2014
tomter2014

Reputation: 313

django-admin 1.4.3 wants to use 1.8

I uninstalled Django 1.8 off of my Ubuntu machine and now django-admin won't work from inside a Virtualenv or not, should I reinstall Ubuntu?

For example I tried to create a project in a Virtualenv here

(django-1.4.3)to@tom-P34:~/project/django-1.4.3$ django-admin startproject he_tut

But I get this error

Traceback (most recent call last):
  File "/usr/local/bin/django-admin", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module>
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 446, in _build_master
    return cls._build_from_requirements(__requires__)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 459, in _build_from_requirements
    dists = ws.resolve(reqs, Environment())
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 628, in resolve
    raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: Django==1.8.dev20140602225050

So I try and start an project outside of the Virtualenv

(django-1.4.3)to@tom-P34:~/project/django-1.4.3$ deactivate
to@tom-P34:~/project/django-1.4.3$ cd ..
to@tom-P34:~/project$ django-admin startproject he_tut

and I got the same error as above.

The virtual enviroment has django 1.4.3, the root system has no Django at all and I'm using python 2.7.6.

Upvotes: 1

Views: 221

Answers (1)

St&#233;phane Bruckert
St&#233;phane Bruckert

Reputation: 22973

You should write django-admin.py instead of django-admin alone:

django-admin.py startproject he_tut

Upvotes: 1

Related Questions