gyp ERR! find Python 解决方案
命令行报错如下
gyp ERR! find Python
解决方案
1.安装node-gyp
npm install -g node-gyp
2.安装python
推荐安装2.7版本(自行选择32位或者64位安装):下载地址
如果官网下载速度很慢,可以使用另一种安装方式
以管理员身份执行cmd
npm install --global --production windows-build-tools
3.配置环境变量
环境变量->系统环境变量->Path
4.npm 配置
npm config set python “D:\Python27\python.exe”
npm config set node_gyp “D:\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js”