nodejs 异常 stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
异常: stack Error: Can't find Python executable "python", you can set the PYTHON env variable.
解决方法:
- 清空 npm 缓存
npm cache clean --force
- 管理员身份执行命令
npm install --global --production windows-build-tools
安装成功提示!
---------- Visual Studio Build Tools ----------
Still waiting for installer log file...
------------------- Python --------------------
Successfully installed Python 2.7
注意 C:\Users\用户名\.windows-build-tools\python27
添加到系统环境变量
执行命令:
npm config set python "D:\Python27\python.exe"
- 安装 node-gyp
npm install --global node-gyp
然后 npm install
重新安装项目
推荐指数:
真诚点赞 诚不我欺~