Installation of Django

41 views
Skip to first unread message

JJ Zolper

unread,
Nov 24, 2011, 12:00:30 AM11/24/11
to Django users
Hello,

I am new to Django! I was able to download and install: Python 2.7.2
x86 64 on my Windows 7 64 bit machine. I think that is all that I will
need to execute the command line?

I installed Python to C:/Python27 as the program intended.

I then downloaded: Django-1.3.1.tar.gz file and was try to figure
where to go to next. I used the 7 zip to extract it to:
Django-1.3.1.tar. But I wasn't sure the next steps. I opened the
Python cmd prompt. I typed the command in: tar xzvf Django-*.tar.gz.
But I got errors about the portion "xzvf" I feel that the directories
are not set up correctly. Do I need to adjust my command for the
directory because I already tried that.

I would really appreciate a step through that would get me all set up
with the baseline. I am interested to moving on from to the more in
depth chapters. I tried hard to understand the input from the comments
on the page but I was unable to find anything that gave me any sense
of direction on how to place the Django files.

Thanks!

JJ

PS. sorry this is available and I didn't see it in the new booklet.

Tom Evans

unread,
Nov 24, 2011, 10:37:07 AM11/24/11
to django...@googlegroups.com

tar.gz is a gzipped (.gz) tape archive (.tar) file. 7zip should be
able to gunzip it and extract the files from the archive - it might
require two steps.

The 'tar xzvf…' command is how one extracts a tar.gz under unix/linux
from the OS command line - not the python command line. As the docs
say, you can download and install bsdtar in windows, in which case the
OS command would be 'bsdtar zxvf …'.

This is the second time this week someone has had issues extracting a
tgz on windows - any chance that django could be packaged up in a more
Windows friendly zip file format in addition to tgz?

Cheers

Tom

https://docs.djangoproject.com/en/1.3/topics/install/#installing-an-official-release

Joey Espinosa

unread,
Nov 24, 2011, 11:40:09 AM11/24/11
to django...@googlegroups.com

If you install the "setuptools" package (http://goo.gl/UjFh), then all you have to do to install Django (or any other Python library) is this:

easy_install django

And it will handle the rest. Just a suggestion.

--
Joey "JoeLinux" Espinosa
Software Developer
http://about.me/joelinux

--
You received this message because you are subscribed to the Google Groups "Django users" group.
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.

JJ Zolper

unread,
Nov 24, 2011, 11:52:00 AM11/24/11
to Django users
Tom,

7zip works great. I am able to unzip the .tgz file and I have my .tar
file. Now it is on to installation of it.

Okay I have worked with UNIX before so I have some knowledge. I am
studying to be a Computer Engineer at VT and have had some experience.
My intuition tells me that if I even wanted to work from the command
line I would need to adjust the: tar xzvf in windows because I
would have already unzipped it. As for the documentation would bsdtar
extract and execute? I have no issues extracting I just feel that with
little knowledge of adjusting the command line calls properly I am not
able to set this up properly in windows. This has surely helped
though!

I am not sure where you are heading with this part. I am able to
extract it just fine with 7zip. The issue is the next step. I feel
there needs to be some information on the django site that says okay
windows users have extracted your command will look like this: .......
to execute the .tar file. Not to mention the cd or current directory
command can be used to change your location to properly aligned your
current directory as well as placing the extracted .tar file in this
location you move to in the command prompt. As for formatting
purporses I am the most familiar with .zip files they are extremely
simple to work with, especially in a windows environment. I do have
experience with .tar however it DID NOT click that this was a UNIX
kernel command. As I am in windows and just assumed that was for
me. :/

Cheers

JJ

On Nov 24, 10:37 am, Tom Evans <tevans...@googlemail.com> wrote:

> https://docs.djangoproject.com/en/1.3/topics/install/#installing-an-o...

JJ Zolper

unread,
Nov 24, 2011, 11:55:06 AM11/24/11
to Django users
JoeLinux,

Oh interesting. It seems the 64 bit version is sort of unclear. Any
help there?

Would I be able to install my Python is well with a smaller command? I
am back at ground zero because I had to adjust the Python version back
to 2.5 so Django would agree.

I am interested just not sure how to work the 64 bit version.

Thanks!

JJ

On Nov 24, 11:40 am, Joey Espinosa <jlouis.espin...@gmail.com> wrote:
> If you install the "setuptools" package (http://goo.gl/UjFh), then all you
> have to do to install Django (or any other Python library) is this:
>
> easy_install django
>
> And it will handle the rest. Just a suggestion.
>
> --
> Joey "JoeLinux" Espinosa

> Software Developerhttp://about.me/joelinux
> On Nov 24, 2011 10:37 AM, "Tom Evans" <tevans...@googlemail.com> wrote:

> >https://docs.djangoproject.com/en/1.3/topics/install/#installing-an-o...

Daniel Roseman

unread,
Nov 24, 2011, 11:57:26 AM11/24/11
to django...@googlegroups.com
On Thursday, 24 November 2011 16:55:06 UTC, JJ Zolper wrote:
JoeLinux,

Oh interesting. It seems the 64 bit version is sort of unclear. Any
help there?

Would I be able to install my Python is well with a smaller command? I
am back at ground zero because I had to adjust the Python version back
to 2.5 so Django would agree.

Would agree with what? Django is perfectly compatible with Python 2.7.

--
DR.

Tom Evans

unread,
Nov 24, 2011, 11:57:21 AM11/24/11
to django...@googlegroups.com
On Thu, Nov 24, 2011 at 4:52 PM, JJ Zolper <jzt...@gmail.com> wrote:
> Tom,
>
> 7zip works great. I am able to unzip the .tgz file and I have my .tar
> file. Now it is on to installation of it.
>

OK, you're still not getting it. You haven't extracted anything,
you've gunzipped it. You now must use 7zip, or another tar aware
program like the command line bsdtar, to extract the contents of the
tar archive. You should not need at any stage a .tar file!

If you have gunzipped the .tar.gz file to give you a .tar file, the
bsdtar command would be different - it would be bsdtar xvf
Djang-1.3.1.tar - omitting the 'z' flag, which stands for
'gunzip/gzip' the archive ('x' is extract, 'v' verbose, 'f' 'from a
file').

Cheers

Tom

Daniel Roseman

unread,
Nov 24, 2011, 11:58:48 AM11/24/11
to django...@googlegroups.com


On Thursday, 24 November 2011 16:52:00 UTC, JJ Zolper wrote:
Tom,

7zip works great. I am able to unzip the .tgz file and I have my .tar
file. Now it is on to installation of it.

.tar is stil an archive. You need to extract that as well - 7zip should be able to do the job.
--
DR. 

Ivo Brodien

unread,
Nov 24, 2011, 11:58:13 AM11/24/11
to django...@googlegroups.com

windows users have extracted your command will look like this: .......
to execute the .tar file.

as tom mentioned, you have to use 7zip two times.

the tar file is another archive (like .zip, .gz ) which you have to decompress and then you have the django directory and you can go on with the tutorial.

JJ Zolper

unread,
Nov 24, 2011, 7:53:30 PM11/24/11
to django...@googlegroups.com
JoeLinux,

I read on the Django site that versions 2.3 to 2.6 where the appropiate versions of Python for the Django code.

That's what I meant by agree. Does it work fine with 2.7 Python?

JJ

--
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/-/ZbE6FIcOUqMJ.

JJ Zolper

unread,
Nov 24, 2011, 7:59:14 PM11/24/11
to django...@googlegroups.com
Okay just so everyone knows!

I was able to extract the .tar file and I now see the files.

In order to import these files correctly should I place these files in the install directory of Python 2.7 and then attempt the commands?

Or is the location of Django just arbitrary can I place it wherever I like and then work from the Python prompt?

JJ

Timothy Makobu

unread,
Nov 24, 2011, 11:56:39 PM11/24/11
to django...@googlegroups.com
  • Install setup tools http://pypi.python.org/pypi/setuptools/0.6c11
  • Go to the command line (cmd.exe) and type
    • easy_install django
    • easy_install ipython (not needed by django, but very useful, as you will see when you come to running "python manage.py shell"
That's all!

JJ Zolper

unread,
Nov 25, 2011, 11:09:26 AM11/25/11
to Django users
Hello Tim,

I was able to install Python 2.7 64-bit for Windows 7. I then
downloaded the ez_setup.py and ran it. It installed the .egg file.

I then attemped the Python command line:

- easy_install django
- easy_install ipython

However I had no success installing the packages.

I posted my error output on my site: http://madtrak.com/error.png

JJ

On Nov 24, 11:56 pm, Timothy Makobu <makobu.mwambir...@gmail.com>
wrote:
>    - Install setup toolshttp://pypi.python.org/pypi/setuptools/0.6c11
>    - Go to the command line (cmd.exe) and type
>       - easy_install django
>       - easy_install ipython (not needed by django, but very useful, as you

william ratcliff

unread,
Nov 25, 2011, 11:34:24 AM11/25/11
to django...@googlegroups.com
You don't run easy_install from within python, but rather from the
command line. So, in your start window, you want to use run to start
"cmd.exe". This will open a window with a dos prompt. From there,
type "easy_install django" followed by the enter key....

I think before starting django, you might want to spend a bit of time
playing with python. My students liked "coding bat", but there
should be a number of tutorials on the web.

JJ Zolper

unread,
Nov 25, 2011, 11:41:59 AM11/25/11
to Django users
William,

Oh I thought that's what was meant. I did that.

Yes yes but I think I am all set up with Django from what you saw in
the other discussion.

I should google coding bat?

I have worked with some of this stuff in my engineering classes but
would it really help to learn more Python first? Django is structured
with Python but I had the impression that that was in the backend that
I would never see that. I'm all ears!!!

What I thought was the best was what I was seeing about the ease of
working with content in databases.

JJ

On Nov 25, 11:34 am, william ratcliff <william.ratcl...@gmail.com>
wrote:


> You don't run easy_install from within python, but rather from the
> command line.  So, in your start window, you want to use run to start
> "cmd.exe".  This will open a window with a dos prompt.   From there,
> type "easy_install django" followed by the enter key....
>
> I think before starting django, you might want to spend a bit of time
> playing with python.   My students liked "coding bat", but there
> should be a number of tutorials on the web.
>

Tom Evans

unread,
Nov 25, 2011, 11:47:54 AM11/25/11
to django...@googlegroups.com
On Fri, Nov 25, 2011 at 4:41 PM, JJ Zolper <jzt...@gmail.com> wrote:
> I have worked with some of this stuff in my engineering classes but
> would it really help to learn more Python first? Django is structured
> with Python but I had the impression that that was in the backend that
> I would never see that. I'm all ears!!!

You got the wrong impression. Django is all about writing applications
in python that run using the Django library and framework.

There are certain Django apps that you can use, like Satchmo,
django-cms, which are the equivalent of something like Wordpress, a
PHP app you can install and customize without knowing or writing
any/much PHP.

Cheers

Tom

JJ Zolper

unread,
Nov 25, 2011, 11:52:00 AM11/25/11
to Django users
Tim,

I'm not sure if this has been established but I am in Windows 7.

I realized that I was in the wrong prompt so I went to cmd.exe.

I then tried both commands and returned errors:

I also tried going to the directory where I had Django located and
running the command as well as ipython but had no sucess do I need to
move to the location of the Python files to run ipython.

Maybe UNIX systems are easier to set this up then Windows? I wouldn't
be surprised.

http://madtrak.com/error2.png

JJ

On Nov 24, 11:56 pm, Timothy Makobu <makobu.mwambir...@gmail.com>


wrote:
>    - Install setup toolshttp://pypi.python.org/pypi/setuptools/0.6c11

>    - Go to the command line (cmd.exe) and type
>       - easy_install django
>       - easy_install ipython (not needed by django, but very useful, as you

JJ Zolper

unread,
Nov 25, 2011, 11:56:19 AM11/25/11
to Django users
Tim,

I had a confirmation from William that I installed Django but you said
iPython would be helpful and since I don't remember much Python I was
hoping to make that work.

Thanks so much for taking the time to help me get started you're a
life saver! : )

JJ

On Nov 24, 11:56 pm, Timothy Makobu <makobu.mwambir...@gmail.com>


wrote:
>    - Install setup toolshttp://pypi.python.org/pypi/setuptools/0.6c11

>    - Go to the command line (cmd.exe) and type
>       - easy_install django
>       - easy_install ipython (not needed by django, but very useful, as you

Timothy Makobu

unread,
Nov 25, 2011, 1:20:52 PM11/25/11
to django...@googlegroups.com
Hi, you're welcome. 

Easy install is usually in C:\Python27\Scripts

you can go there from within cmd.exe and run "easy_install.exe ipython"  It should work.

JJ Zolper

unread,
Nov 25, 2011, 4:49:55 PM11/25/11
to django...@googlegroups.com
Tim,

Okay I was able to get something to go there.

At first I saw warnings so I wasn't sure but here are the images.



Do you think I am in good shape with ipython?

To perform the easy install of django would i execute: easy_install.exe django?

And if so would that just overwrite what I have already installed, like would it be good to do it a second time even though I think it worked the first. Honestly, I'd probably leave it for now just wanted your thoughts on easy install.

Thanks!

JJ

Timothy Makobu

unread,
Nov 26, 2011, 12:56:04 AM11/26/11
to django...@googlegroups.com
Yes, iPython is installed now. But now you need to add  C:\Python27\Scripts to your PATH variable, so you wont have to keep going there to run things. After you add it, you can run django-admin.py, easy_install, iPython ... from any directory in cmd.exe 

JJ Zolper

unread,
Nov 26, 2011, 1:51:34 PM11/26/11
to django...@googlegroups.com
Thanks! Yes sounds like something from my UNIX class. I have now added it.

What will django-admin.py do for me? Oh are you just saying I can run it from anywhere now? Any of the commands I want to work with python/django?

JJ

JJ Zolper

unread,
Nov 26, 2011, 1:55:49 PM11/26/11
to django...@googlegroups.com
Looks like I am in good shape!

Thanks so much man!


JJ

Timothy Makobu

unread,
Nov 26, 2011, 2:19:38 PM11/26/11
to django...@googlegroups.com
Nice. Now read ALL of this http://djangobook.com/en/2.0/

Timothy Makobu

unread,
Nov 26, 2011, 2:20:50 PM11/26/11
to django...@googlegroups.com

JJ Zolper

unread,
Nov 26, 2011, 6:55:59 PM11/26/11
to django...@googlegroups.com
So you feel that that documentation of Python is the best reference? I'm sure it is just wanted to ask.

JJ

JJ Zolper

unread,
Nov 26, 2011, 7:52:05 PM11/26/11
to django...@googlegroups.com
Tim,

Does our system include a Python Interpreter? 

"

The interpreter’s line-editing features usually aren’t very sophisticated. On Unix, whoever installed the interpreter may have enabled support for the GNU readline library, which adds more elaborate interactive editing and history features. Perhaps the quickest check to see whether command line editing is supported is typing Control-P to the first Python prompt you get. If it beeps, you have command line editing; see Appendix Interactive Input Editing and History Substitution for an introduction to the keys. If nothing appears to happen, or if ^P is echoed, command line editing isn’t available; you’ll only be able to use backspace to remove characters from the current line.

"

JJ

Timothy Makobu

unread,
Nov 27, 2011, 5:10:14 AM11/27/11
to django...@googlegroups.com
Read that Python tutorial first, It will answer all your questions . You need to read the WHOLE thing.

JJ Zolper

unread,
Nov 27, 2011, 8:46:40 AM11/27/11
to django...@googlegroups.com
Sounds Great!

I started yesterday.

JJ

william ratcliff

unread,
Nov 27, 2011, 9:58:35 AM11/27/11
to django...@googlegroups.com
I've recommended:

To people with good success.


Best,
William
Reply all
Reply to author
Forward
0 new messages