# Path Problem on W2K?

Peter Hansen peter at engcorp.com
Mon Aug 18 17:52:13 CEST 2003

hokiegal99 wrote:
>
> I installed Python-2.3 into c:\Program Files\Python23 on a new W2K SP4
> computer. When I write a Python script and run it from the command
> prompt, I get the following error:
>
> C:\>python 'name-of-script.py'
> 'python' is not recognized as an internal or external command,
> operable program or batch file.
>
> Here's what my path contains:
>
> C:\>path
> PATH=C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;"C:\Program
> Files\Norton
> SystemWorks\Norton Ghost\";C:\Program Files\SSH Communications
> Security\SSH Secu
> re Shell
>
> Any ideas? I've reinstalled and rebooted several times. Also tried
> adding c:\Program Files\Python23 to my path... still get the error.

hideously long.  There is a limit to how long it can be and still
work.

I strongly suggest going through and replacing each long entry with
the short version, as shown by the "DIR" command, to avoid the
spaces (but more importantly, the length!) of those directories.

Also, you can probably remove some of them.  Do you really run
Norton Ghost from the command line?  How often?  Why not just
remove the entry and run it from a .BAT file or .CMD file or
from a Shortcut on the desktop?

Generally, for something like "Secure Shell", I find it much
easier just to write a little batch file that knows the full
path.  Put these batch files in a directory called c:\bin
you can avoid excessive PATH creepage...

Also remember to reboot after changing your path.

Disclaimer: any of these statements may be invalid with respect
to NT, which I don't use.

You could also, for a while, until you decide what to do, execute
Python using the full path:  c:\progra~1\python23\python

-Peter