Description

Item 4 of the following has a bug. the command to run is python setup.py install -- running "setup.py install" actually runs as a Windows shell script for a while and then gives an error message.

Installing an official release

Download the latest release from our download page.

Untar the downloaded file (e.g. tar xzvf Django-NNN.tar.gz, where NNN is the version number of the latest release). If you’re using Windows, you can download the command-line tool bsdtar to do this, or you can use a GUI-based tool such as 7-zip.

Change into the directory created in step 2 (e.g. cd Django-NNN).

If you’re using Linux, Mac OS X or some other flavor of Unix, enter the command sudo python setup.py install at the shell prompt. If you’re using Windows, start up a command shell with administrator privileges and run the command setup.py install.

Good catch--"setup.py install" won't work on Windows without prefixing it with "python". One-word patch is attached for SVN, since we don't fix old docs.

Hang on, are you sure about this?

On my Windows installation of Python, the install directory isn't added to your path but an association is made between .py files and the Python executable. Hence typing python followed by anything won't normally work, but running foo.py by typing its name should do the right thing.

On my Windows installation of Python, the install directory isn't added to your path but an association is made between .py files and the Python executable. Hence typing python followed by anything won't normally work, but running foo.py by typing its name should do the right thing.

In the "old days", command-line behavior was different between 95-based Windows and NT-based Windows; 95 wouldn't let you do "somescript.py" on the command-line but NT would (and were this really got interesting was piping stdin/stdout.)

I'm not sure what the default behavior after a Windows Python install is these days, but I much prefer adding bin to my path and doing "python somescript.py" to keep things consistent (with my other junk done on OS X.)

So there seems to be some disagreement as to whether this is necessary or not.

What is the standard behaviour if you install Python using python.org's installer on a recent version of Windows (say vista and/or the version before that)? I'm not interested in how it is possible to customise things. What happens in the absolutely standard case? If somebody has to read those commands and follow them word for word, then they aren't going to be able to puzzle out the subtleties of what used to happen versus now. So we have to be very clear. If things changed at some point in Windows and we know when, we can note that, too.

At the moment, I'm not comfortable making this change because it may or may not make things worse. So can somebody with access to Windows please confirm what the normal behaviour would be. Do you need to type "python" or does it make things worse?

I was running Windows XP, without customizing anything. If I type the name of a python file, *.py, windows tried to run it as a windows shell script, not as a python script. So, in this case, it starts to run because some commands in the file look like valid shell commands, but then I get a weird error message somewhere in the file. In my standard setup, typing python first is necessary.

This happens a few times in the installation instructions; this was just the first place I noticed it. The instructions switch back and forth a bit between including vs. not including "python".