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

 

vue中安装node-sass
npm install node-sass --save-dev
1
出现上面图中问题

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

npm install --global --production windows-build-tools
1
否则会提示:

Please restart thie script from a administrative PowerShell!
1
再输入

npm install --global node-gyp

原文链接:https://blog.csdn.net/caicsama/article/details/103679242

posted @ 2021-04-13 13:25  威武的大萝卜  阅读(5560)  评论(1编辑  收藏  举报