Running script from powershell prompt

61 views Asked by At

I have installed python 2.7.4 in the directory C:\python27, and I have edited my user environment variable to include:

Python       C:\python27;C:\python27\Tools\Scripts\pyscripts

(pyscripts is a directory containing my python programs)

Using PowerShell 2009, from the prompt PS C:\>, I type:

python trigrams.py

This results in the following error message;

The term 'python ' is not recognized as the name of  a cmdlet, function, script file or operable program. Check the spelling of the name, or if a path was included, verify that the path name is correct and try again.
    *python <<<< chunks.py
    +CategoryInfo  :ObjectNotFound:<python:String> [].CommandNotFoundException
    +FullyQualifiedErrorID  :CommandNotFouindException

What is causing this?

1

There are 1 answers

0
tenfishsticks On

Your PATH variable doesn't include C:\python27