npm-python报错

报错场景:

npm安装依赖过程中,开始都很正常,最后报这个错:
Error: Can't find Python executable "python", you can set the PYTHON env variable

img

解决:

1、安装windows-build-tools

npm install --global --production windows-build-tools

2、安装node-gyp

npm install --global node-gyp

img

原文地址:https://www.cnblogs.com/ajaemp/p/14976519.html