I think Daniel might mean you can also use the __file__ attribute, as
in:
>>> import django
>>> django.__file__

Hope that helps,
Alex

On May 28, 4:07 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On May 28, 9:56 am, Derek <gamesb...@gmail.com> wrote:
>
>
>
> > 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
>
> 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.

-- 
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