How to check if I installed Django well?

5,270 views
Skip to first unread message

Archidjango

unread,
Mar 16, 2010, 5:49:19 AM3/16/10
to Django users
Hey all,

I'm a fresh Python/Django user and I'm experiencing a couple of
problems to check if Django is correctly installed on my machine. Well
I guess it's not honestly.

I used Windows XP and untarred Django 1.1.1 directly on my C: drive.


When I try to import django in IDLE, this is what I get:

>>> import django

Traceback (most recent call last):
File "<pyshell#4>", line 1, in <module>
import django
ImportError: No module named django

----

Basically, I think it's downloaded and untarred but not installed
well.

I tried to follow the instructions on the django website, but I'm not
sure to understand well what is meant by the following:

tar xzvf Django-1.1.1.tar.gz
cd Django-1.1.1
sudo python setup.py install

Could anyone help me please? I'm really a beginner in programmation
(as you probably have guessed), so don't be scared to oversimplify ;-)

Thanks a lot in advance!

Jirka Vejrazka

unread,
Mar 16, 2010, 7:41:15 AM3/16/10
to django...@googlegroups.com
Hi,

if you've untarred the Django archive, you have a new directory
called (probably) Django-1.1.1. Just go into that directory (in the
command line, do "cd Django-1.1.1") and then run installation the
standard Python way (for Python packages): "python setup.py install".

It should run for a few moments and (hopefully) complete without
errors. Then you will be able to remove the original package you've
downloaded and the "untarred" directory. Diango will be installed in
your Python's site-packages directory.

To test, you can try:
C:\> python
>>> import django
>>> django.VERSION
(1, 1, 1)

Hope it helps

Jirka

Daniel Roseman

unread,
Mar 16, 2010, 7:43:57 AM3/16/10
to Django users

Those are the instructions for Linux/Unix systems. You're on Windows.
The documentation states:
"If you're using Windows, start up a command shell with administrator
privileges and run the command 'setup.py install'."
http://docs.djangoproject.com/en/1.1/topics/install/#installing-official-release
--
DR.

Archidjango

unread,
Mar 17, 2010, 6:41:21 AM3/17/10
to Django users
Alright! Works fine now!!

Thanks a lot!!! :-)

> privileges and run the command 'setup.py install'."http://docs.djangoproject.com/en/1.1/topics/install/#installing-offic...
> --
> DR.- Hide quoted text -
>
> - Show quoted text -

Rakhi Vysyaraju

unread,
Oct 25, 2018, 7:27:39 AM10/25/18
to Django users
You can use pip install Django if you have already downloaded the tar package.
and then go to python via your shell using the python command and then say import Django 
you will see the next command line without any errors.
Reply all
Reply to author
Forward
0 new messages