Opened 8 years ago

Closed 8 years ago

Last modified 7 years ago

#5688 closed (duplicate)

missing word in Windows install instructions

Reported by: epnichols@… Owned by: anonymous
Component: Documentation Version: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: UI/UX:

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

  1. Download the latest release from our download page.
  2. 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.
  3. Change into the directory created in step 2 (e.g. cd Django-NNN).
  4. 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.

Attachments (1)

5688.diff (639 bytes) - added by mboersma 8 years ago.
Corrects Windows install command

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by mboersma

Corrects Windows install command

comment:1 follow-up: Changed 8 years ago by mboersma

  • Has patch set
  • Needs documentation unset
  • Needs tests unset
  • Owner changed from nobody to mboersma
  • Patch needs improvement unset
  • Status changed from new to assigned
  • Triage Stage changed from Unreviewed to Ready for checkin
  • Version changed from 0.96 to SVN

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.

comment:2 in reply to: ↑ 1 ; follow-up: Changed 8 years ago by nickefford

Replying to mboersma:

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.

comment:3 in reply to: ↑ 2 Changed 8 years ago by anonymous

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.

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

comment:4 Changed 8 years ago by mtredinnick

  • Patch needs improvement set
  • Triage Stage changed from Ready for checkin to Accepted

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?

comment:5 Changed 8 years ago by Eric Nichols <epnichols@…>

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

comment:6 Changed 8 years ago by mboersma

  • Owner changed from mboersma to anonymous
  • Status changed from assigned to new

For me on Windows XP with Python 2.5.1, typing the name of a python file at the command prompt doesn't do anything. I always must prefix it with "python." YMMV,

comment:7 Changed 8 years ago by ubernostrum

  • Resolution set to duplicate
  • Status changed from new to closed

I'm going to dupe this for #4878, which aims to generally improve the docs for installing on Windows.

comment:8 Changed 7 years ago by thor574

I see this has not been fixed in the documentation still, it is really fast to fix, just add word "python" in front of "python.py install".

comment:9 Changed 7 years ago by thor574

Correction:
I see this has not been fixed in the documentation still, it is really fast to fix, just add word "path-to-python-dir/python" in front of "python.py install".
(I use Vista)

comment:10 Changed 7 years ago by thor574

It is now hard to admit it also works without what I just said. It works even better (clean display output). I would delete my two comments if I could.

Note: See TracTickets for help on using tickets.
Back to Top