報錯場景:npm安裝依賴過程中,開始都很正常,最後報這個錯:
Error: Can't find Python executable "python", you can set the PYTHON env variable
截圖如下:
解決辦法:
1、安裝windows-build-tools
npm install --global --production windows-build-tools
2、安裝node-gyp
npm install --global node-gyp
問題完美解決!
本文感謝https://blog.csdn.net/qq_39165556/article/details/94590365的分享