项目执行npm install时报错,报错信息如下:

Can‘t find Python executable “/path/to/executable/python2.7“, you can set the PYTHON env variable_Developer

解决办法

设置环境变量:

  1. 打开 cmd -->
  2. 输入 path=%path%;D:\Tools\Developer\Python(python本地安装目录)
path=%path%;D:\Tools\Developer\Python
  1. 执行
npm config set python "D:\Tools\Developer\Python\python.exe"
  1. 再执行
npm install