where did I install Django

19 views
Skip to first unread message

jdw

unread,
Mar 20, 2012, 6:30:43 PM3/20/12
to django...@googlegroups.com
Newbie alert...

I installed Django and finished the first tutorial.  On the second one, I could not log in to the website because  I didn't set a superuser.  Ultimately, I figured out my problem, but I realized I have no idea where I installed Django.  Is there an easy way to find out where the code lives?

I realized I had no idea when the tutorial suggested running this:

python /path/to/django/contrib/auth/create_superuser.py


Jonathan Baker

unread,
Mar 20, 2012, 6:50:49 PM3/20/12
to django...@googlegroups.com
If you're on Linux, running:
$ sudo find / -type d -name django -print
...should do the trick. On my system, it's in '/usr/local/lib/python2.7/dist-packages/django

Cheers.



--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/9FZCBitFicMJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Jonathan D. Baker
Web Developer
http://jonathandbaker.com
303.257.4144

Furbee

unread,
Mar 20, 2012, 6:52:05 PM3/20/12
to django...@googlegroups.com
From an answer on stackoverflow.com (http://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory):

Enter python shell by executing python binary:


    from distutils.sysconfig import get_python_lib
print(get_python_lib())

It usually resides in a folder named site-packages or dist-packages somewhere in the Python directory. In Windows it is different than in Unix.

When all else fails, you can run a find command on Unix, or a do an advanced search in Windows.

jdw

unread,
Mar 20, 2012, 7:30:13 PM3/20/12
to django...@googlegroups.com
got it!  This one worked.  Thanks. 

On Tuesday, March 20, 2012 3:52:05 PM UTC-7, Furbee wrote:
From an answer on stackoverflow.com (http://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory):

Enter python shell by executing python binary:

    from distutils.sysconfig import get_python_lib
print(get_python_lib())

It usually resides in a folder named site-packages or dist-packages somewhere in the Python directory. In Windows it is different than in Unix.

When all else fails, you can run a find command on Unix, or a do an advanced search in Windows.

On Tue, Mar 20, 2012 at 3:30 PM, jdw <poisonoakproductions@gmail.com> wrote:
Newbie alert...

I installed Django and finished the first tutorial.  On the second one, I could not log in to the website because  I didn't set a superuser.  Ultimately, I figured out my problem, but I realized I have no idea where I installed Django.  Is there an easy way to find out where the code lives?

I realized I had no idea when the tutorial suggested running this:

python /path/to/django/contrib/auth/create_superuser.py


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/9FZCBitFicMJ.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.

Andre Terra

unread,
Mar 21, 2012, 2:11:31 PM3/21/12
to django...@googlegroups.com
How to have a sane python setup:

1. use pip and virtualenv[1]
2. ???
3. PROFIT!

Cheers,
AT





To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/bHhVJmu5AJEJ.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages