我正在尝试通过npm安装@ angular-cli。
我收到以下错误。
gyp verb check python checking for Python executable "python2" in the PATH
gyp verb `which` failed Error: not found: python2
我猜,路径中不存在python。但我没有管理员帐户,无法对环境变量进行更改。
运行 npm install 时,通过提及python路径,有没有办法运行 npm install -g @ angular / cli 。
答案 0 :(得分:1)
您可以将以前npm的'python'配置键设置为适当的值:
$ npm config set python /path/to/executable/python2.7