python无法识别

时间:2017-08-21 11:26:51

标签: python visual-studio-2010

我正在尝试安装pylint,因为我正在使用VS代码,但我不断收到此错误代码:

PS C:\Users\Alex> python -m pip install pylint
python : 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 is correct and try again.
At line:1 char:1
+ python -m pip install pylint
+ ~~~~~~
+ CategoryInfo          : ObjectNotFound: (python:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

我正在运行Windows 10 64位。

编辑:

我尝试使用'py'代替'python'而且它有效。

PS C:\ Users \ Alex> py -m pip install pylint

1 个答案:

答案 0 :(得分:0)

Sol 1)在系统路径环境变量中 - > C:\ Python27; C:\ Python27 \工具\脚本;

Sol 2)以管理员身份运行命令行