Installation problem (version 1.2.1)

283 views
Skip to first unread message

Derek

unread,
May 28, 2010, 4:56:38 AM5/28/10
to django-users
I have just upgraded my version of Ubuntu, which then also installed
Python 2.6. I thought this was a good opportunity to upgrade to
Django 1.2. I removed all traces of Django 1.1.1 that I could find,
along with extra plugins/modules/apps etc, and ran the install for
Django 1.2.1, checking that I was specifying "python2.6" when doing
so.

However when I try and start a new project (django-admin.py
startproject test), I get:

Traceback (most recent call last):
File "/usr/local/bin/django-admin.py", line 2, in <module>
from django.core import management
File "/usr/lib/pymodules/python2.6/django/core/management/__init__.py",
line 11, in <module>
AttributeError: 'module' object has no attribute 'get_version'

If I start a Python session, I can do:

>>> import django
>>> dir(django)
['__builtins__', '__doc__', '__file__', '__name__', '__package__', '__path__']

which seems incomplete?

What (probably obvious) step or action have I missed or messed up?

Thanks
Derek

Daniel Roseman

unread,
May 28, 2010, 5:07:41 AM5/28/10
to Django users
Sounds like you have an old 'django' directory somewhere on your
pythonpath that is empty apart from an __init__.py.

In your shell, do:

>>> import django
>>> django.__path__

to see where it is, and delete it.
--
DR.

Alex Robbins

unread,
May 28, 2010, 9:32:03 AM5/28/10
to Django users
I think Daniel might mean you can also use the __file__ attribute, as
in:
>>> import django
>>> django.__file__

Hope that helps,
Alex
Reply all
Reply to author
Forward
0 new messages