gyp ERR! stack Error : can't find python executable "python",you can set the PYTHON env variable.

gyp ERR! stack Error : can't find python executable

vue中安装node-sass

npm  install node-sass --save-dev

出现上面图中问题

解决办法:
vscode里,打开终端,输入下面的内容
先输入(在管理员模式下打开)

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

否则会提示:

Please restart thie script from a administrative PowerShell!

再输入

npm install --global node-gyp 

参考链接:gyp ERR! stack Error: Can’t find Python executa…

你可能感兴趣的:(vue入门)