Command line prompt broken on XP with Python 2.5 - help!

Discussion in 'Python' started by Endless Story, Feb 16, 2007.

  1. My last version of Python was 2.4, running smoothly on XP with path c:
    \Python24 - no need even to include this path in PATH; everything
    worked as it's supposed to at the command line.

    Just installed Python 2.5, after uninstalling 2.4 (and also 2.3 which
    had lingered). Now if I open a shell in Windows Python is not
    available! Here are the symptoms:

    - If I open a shell using "Command line here" with XP Powertools, then
    enter "python" at the prompt, nothing happens. I don't get a message
    that the command is not recognized, but neither do I get the Python
    prompt. Instead the Windows prompt comes back. No messages, no Python,
    no nothing.

    - If I go so far as to specify the full path to the Python executable,
    I do get the Python prompt and Python appears to work properly -
    except that I can't exit with CTRL-Z.

    - If I open a shell from the Start menu, e.g. Start > run "command",
    then try entering "python", the shell simply blows up.

    What is going on here? I have uninstalled and reinstalled Python 2.5,
    to no avail. I have gone so far as to specify c:\Python25 (the install
    path) in my PATH variable, but this makes no difference. Right now
    Python is unusable to me from the command prompt, meaning all of my
    automation scripts that I run at the command line are gone too.
    Endless Story, Feb 16, 2007
    #1
    1. Advertising

  2. Endless Story

    Jim Guest

    On Feb 16, 5:52 am, "Endless Story" <> wrote:
    > My last version of Python was 2.4, running smoothly on XP with path c:
    > \Python24 - no need even to include this path in PATH; everything
    > worked as it's supposed to at the command line.
    >
    > Just installed Python 2.5, after uninstalling 2.4 (and also 2.3 which
    > had lingered). Now if I open a shell in Windows Python is not
    > available! Here are the symptoms:
    >
    > - If I open a shell using "Command line here" with XP Powertools, then
    > enter "python" at the prompt, nothing happens. I don't get a message
    > that the command is not recognized, but neither do I get the Python
    > prompt. Instead the Windows prompt comes back. No messages, no Python,
    > no nothing.
    >
    > - If I go so far as to specify the full path to the Python executable,
    > I do get the Python prompt and Python appears to work properly -
    > except that I can't exit with CTRL-Z.
    >
    > - If I open a shell from the Start menu, e.g. Start > run "command",
    > then try entering "python", the shell simply blows up.
    >
    > What is going on here? I have uninstalled and reinstalled Python 2.5,
    > to no avail. I have gone so far as to specify c:\Python25 (the install
    > path) in my PATH variable, but this makes no difference. Right now
    > Python is unusable to me from the command prompt, meaning all of my
    > automation scripts that I run at the command line are gone too.


    Are you talking about the Environment Variables-->System Variable--
    >path?

    You may want to right click on My Computer-->System Properties--
    >Advanced-->Environment Variables-->System variables-->Path-->Edit.

    And check to see if it's there, if not then add it.
    Thanks,
    Jim
    Jim, Feb 16, 2007
    #2
    1. Advertising

  3. On Feb 16, 9:56 am, "Jim" <> wrote:
    > On Feb 16, 5:52 am, "Endless Story" <> wrote:
    > Are you talking about the Environment Variables-->System Variable-->path?
    > You may want to right click on My Computer-->System Properties-->Advanced-->
    > Environment Variables-->System variables-->Path-->Edit.
    > And check to see if it's there, if not then add it.


    I've already added the new python to my path in this fashion, but to
    no avail.

    Besides, if it were a path problem in the usual sense, the symptom
    would be a message at the command line saying that "python" is not
    recognized. Since I don't get this message, it's not a typical path
    problem. What it is, I don't know - that's my quandry.
    Endless Story, Feb 16, 2007
    #3
  4. Endless Story

    Tim Golden Guest

    Endless Story wrote:
    > On Feb 16, 9:56 am, "Jim" <> wrote:
    >> On Feb 16, 5:52 am, "Endless Story" <> wrote:
    >> Are you talking about the Environment Variables-->System Variable-->path?
    >> You may want to right click on My Computer-->System Properties-->Advanced-->
    >> Environment Variables-->System variables-->Path-->Edit.
    >> And check to see if it's there, if not then add it.

    >
    > I've already added the new python to my path in this fashion, but to
    > no avail.
    >
    > Besides, if it were a path problem in the usual sense, the symptom
    > would be a message at the command line saying that "python" is not
    > recognized. Since I don't get this message, it's not a typical path
    > problem. What it is, I don't know - that's my quandry.
    >


    I've certainly never seen anything like what you've described,
    and I've had Python 2.5 installed and uninstalled on several
    different machines (Win2k & WinXP). I would ask if you had
    *any* other Python installation -- say a cygwin one -- which
    might just be getting in the way? Are you an administrator on
    the machine you're on? Sometimes (a while ago and with the
    ActiveState distro rather than python.org one) it has been
    known to cause problems if you're not. Do the previous
    installations still work?

    Clutching at straws, really.

    TJG
    Tim Golden, Feb 16, 2007
    #4
  5. On Feb 16, 10:29 am, Tim Golden <> wrote:
    > I would ask if you had *any* other Python installation
    > -- say a cygwin one -- which might just be getting in the way?


    It's a cygwin problem, guddammit. I was wondering if this might be the
    case - I should have mentioned in my initial post that I've got a
    whole Cygwin setup, including Python.

    I know the conflict is the problem because just now I opened up a
    command shell in XP (not the Cywgin bash window), and instead of
    typing "python" and getting nothing, I tried "which python" - which
    when you think about it, shouldn't even work in a XP shell. But
    somehow Cygwin is mingling some of its capabilities with the XP shell,
    because "which python" actually gets an answer - "/usr/bin/python,"
    which is Cygwin.

    Now the question is how to fix this - I don't want to uninstall the
    Cygwin version. Instead I need some way of unknotting Cygwin's
    intrusion into what should be an XP-only shell, or else a way of
    giving priority when in that shell (and not the bash shell, which I
    also use) to the Python executable residing at C:\Python25.
    Endless Story, Feb 16, 2007
    #5
  6. Endless Story

    Steve Holden Guest

    Endless Story wrote:
    > On Feb 16, 10:29 am, Tim Golden <> wrote:
    >> I would ask if you had *any* other Python installation
    >> -- say a cygwin one -- which might just be getting in the way?

    >
    > It's a cygwin problem, guddammit. I was wondering if this might be the
    > case - I should have mentioned in my initial post that I've got a
    > whole Cygwin setup, including Python.
    >
    > I know the conflict is the problem because just now I opened up a
    > command shell in XP (not the Cywgin bash window), and instead of
    > typing "python" and getting nothing, I tried "which python" - which
    > when you think about it, shouldn't even work in a XP shell. But
    > somehow Cygwin is mingling some of its capabilities with the XP shell,
    > because "which python" actually gets an answer - "/usr/bin/python,"
    > which is Cygwin.
    >
    > Now the question is how to fix this - I don't want to uninstall the
    > Cygwin version. Instead I need some way of unknotting Cygwin's
    > intrusion into what should be an XP-only shell, or else a way of
    > giving priority when in that shell (and not the bash shell, which I
    > also use) to the Python executable residing at C:\Python25.
    >

    It sounds like you may have mistakenly added Cygwin binary directories
    to your Windows path. This isn't normally necessary, since the Cygwin
    shell makes all necessary path adjustments as it starts.

    regards
    Steve
    --
    Steve Holden +44 150 684 7255 +1 800 494 3119
    Holden Web LLC/Ltd http://www.holdenweb.com
    Skype: holdenweb http://del.icio.us/steve.holden
    Blog of Note: http://holdenweb.blogspot.com
    See you at PyCon? http://us.pycon.org/TX2007
    Steve Holden, Feb 16, 2007
    #6
  7. On Feb 16, 11:34 am, Steve Holden <> wrote:
    > Endless Story wrote:
    > > On Feb 16, 10:29 am, Tim Golden <> wrote:
    > >> I would ask if you had *any* other Python installation
    > >> -- say a cygwin one -- which might just be getting in the way?

    >
    > > It's a cygwin problem, guddammit. I was wondering if this might be the
    > > case - I should have mentioned in my initial post that I've got a
    > > whole Cygwin setup, including Python.

    >
    > > I know the conflict is the problem because just now I opened up a
    > > command shell in XP (not the Cywgin bash window), and instead of
    > > typing "python" and getting nothing, I tried "which python" - which
    > > when you think about it, shouldn't even work in a XP shell. But
    > > somehow Cygwin is mingling some of its capabilities with the XP shell,
    > > because "which python" actually gets an answer - "/usr/bin/python,"
    > > which is Cygwin.

    >
    > > Now the question is how to fix this - I don't want to uninstall the
    > > Cygwin version. Instead I need some way of unknotting Cygwin's
    > > intrusion into what should be an XP-only shell, or else a way of
    > > giving priority when in that shell (and not the bash shell, which I
    > > also use) to the Python executable residing at C:\Python25.

    >
    > It sounds like you may have mistakenly added Cygwin binary directories
    > to your Windows path. This isn't normally necessary, since the Cygwin
    > shell makes all necessary path adjustments as it starts.
    >
    > regards
    > Steve
    > --
    > Steve Holden +44 150 684 7255 +1 800 494 3119
    > Holden Web LLC/Ltd http://www.holdenweb.com
    > Skype: holdenweb http://del.icio.us/steve.holden
    > Blog of Note: http://holdenweb.blogspot.com
    > See you at PyCon? http://us.pycon.org/TX2007
    Endless Story, Feb 16, 2007
    #7
  8. On Feb 16, 11:34 am, Steve Holden <> wrote:
    > It sounds like you may have mistakenly added Cygwin binary directories
    > to your Windows path. This isn't normally necessary, since the Cygwin
    > shell makes all necessary path adjustments as it starts.


    I did add c:/cywgin to the path, don't remember why now.

    For the moment I've moved c:\cygwin to the end of my path, so that it
    comes after c:\Python25, and reinstalled Python 2.5. That seems to
    have cured at least this particular problem with Python. When I have a
    spare moment I will take cygwin out of the path altogether and see if
    I can remember why I put it in there to begin with ...
    Endless Story, Feb 16, 2007
    #8
  9. On Feb 16, 11:51 am, "Endless Story" <> wrote:
    > On Feb 16, 11:34 am, Steve Holden <> wrote:
    >
    > > It sounds like you may have mistakenly added Cygwin binary directories
    > > to your Windows path. This isn't normally necessary, since the Cygwin
    > > shell makes all necessary path adjustments as it starts.


    Okay - here is from the Cygwin manual available online at http://
    cygwin.com/cygwin-ug-net/cygwin-ug-net.html:

    "The PATH environment variable is used by Cygwin applications as a
    list of directories to search for executable files to run. This
    environment variable is converted from Windows format (e.g. C:\WinNT
    \system32;C:\WinNT) to UNIX format (e.g., /WinNT/system32:/WinNT) when
    a Cygwin process first starts. Set it so that it contains at least the
    x:\cygwin\bin directory where "x:\cygwin is the "root" of your cygwin
    installation if you wish to use cygwin tools outside of bash."
    Endless Story, Feb 16, 2007
    #9
  10. On Feb 16, 11:51 am, "Endless Story" <> wrote:
    > I did add c:/cywgin to the path, don't remember why now.


    Having looked at the Cygwin user manual, I think I probably did this
    as the result of misunderstanding the installation process. A PATH
    variable is needed, but it can go into cygwin.bat.
    Endless Story, Feb 16, 2007
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. chrisdude911
    Replies:
    10
    Views:
    135,395
    srk289
    Mar 10, 2009
  2. raeiko

    c program - command line prompt - need help

    raeiko, Mar 1, 2009, in forum: C Programming
    Replies:
    8
    Views:
    2,438
    Richard
    Mar 2, 2009
  3. jacob navia

    Re: c program - command line prompt - need help

    jacob navia, Mar 2, 2009, in forum: C Programming
    Replies:
    29
    Views:
    801
    CBFalconer
    Mar 5, 2009
  4. Ulf Meinhardt
    Replies:
    1
    Views:
    967
    Andrew Thompson
    Aug 10, 2009
  5. Ulf Meinhardt
    Replies:
    6
    Views:
    868
    Martin Gregorie
    Aug 25, 2009
Loading...

Share This Page