我已经在目录C:\ python27中安装了python 2.7.4,并且我编辑了我的用户环境变量以包含:
Python C:\python27;C:\python27\Tools\Scripts\pyscripts
(pyscripts
是一个包含我的python程序的目录)
使用PowerShell 2009,在提示符PS C:\>
中输入:
python trigrams.py
这会导致以下错误消息;
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
造成这种情况的原因是什么?
答案 0 :(得分:0)
您的PATH变量不包含C:\ python27