python at command prompt

Matimus mccredie at gmail.com
Thu Nov 1 17:07:01 EDT 2007


On Nov 1, 9:58 am, c395... at hotmail.com wrote:
> [snip]
>
> > Sounds like your path isn't set correctly.  See the first section
> > here[1] on "Finding python.exe"
>
> > -tkc
>
> > [1]http://www.imladris.com/Scripts/PythonForWindows.html
>
> Thanks Tim,
> I set the pythonpath to where the python interpreter is located C:
> \Python24
> However I still get the same error message. Is there something else
> that must be configured?
> thanks.

You don't want to use PYTHONPATH for pointing to the python
executable. PYTHONPATH is for telling python where to look for
modules. What you need to do is set PATH to point to where the python
exectuable lives (probably C:\Python24) and you might want to add the
scripts directory as well (c:\Python24\Scripts).

To do that, right click on 'My Computer' select 'properties'. In the
dialog that appears select the 'Advanced' tab. Click the 'Environment
Variables' button near the bottom of the dialog. In the System
variables section of the new window look for a variable named 'Path',
and edit its contents to include C:\Python24 and C:\Python24\Scripts.
Each entry should be separated by a semi-colon. There is also a way to
do this by editing the registry which I'm sure you could find by doing
a google search.

I'm a little surprised that python doesn't do this by default, or at
least give it as an option during installation.

Matt




More information about the Python-list mailing list